Skip to content
Snippets Groups Projects
Commit 78a85514 authored by Raphael Apard's avatar Raphael Apard
Browse files

Issue #1857870 by Jednorozec, Raphael Apard: Fixed uppercase access on default admin paths

parent 5096a1f2
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ function rename_admin_paths_url_inbound_alter(&$path, $original_path, $path_lang
}
// Get 404 for default admin path
if (preg_match('|^admin(?![^/])|', $original_path)) {
if (preg_match('|^admin(?![^/])|i', $original_path)) {
$path = '404';
}
}
......@@ -124,7 +124,7 @@ function rename_admin_paths_url_inbound_alter(&$path, $original_path, $path_lang
}
// Get 404 for default user path
if (preg_match('|^user(?![^/])|', $original_path)) {
if (preg_match('|^user(?![^/])|i', $original_path)) {
$path = '404';
}
}
......@@ -227,7 +227,7 @@ function rename_admin_paths_settings() {
*/
function rename_admin_paths_form_validate_path_field($element, &$form_state) {
// Force path replacement values to contain only lowercase letters, numbers, and underscores.
if (!preg_match('!^[a-z0-9_]+$!', $element['#value'])) {
if (!preg_match('!^[a-z0-9_]+$!i', $element['#value'])) {
form_error($element, t('Path replacement value must contain only lowercase letters, numbers, and underscores.'));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment