Browse Source
BUG#58246: INSTALL PLUGIN not secure & crashable
BUG#58246: INSTALL PLUGIN not secure & crashable
When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there).pull/73/head
10 changed files with 105 additions and 16 deletions
-
1include/config-netware.h
-
1include/config-win.h
-
2include/m_ctype.h
-
1include/my_global.h
-
2mysql-test/r/plugin_not_embedded.result
-
11mysql-test/t/plugin_not_embedded.test
-
23sql/sql_plugin.cc
-
1sql/sql_plugin.h
-
12sql/sql_udf.cc
-
67strings/my_strchr.c
Write
Preview
Loading…
Cancel
Save
Reference in new issue