I just had to bugfix a user who entered "feeds/events\" as page path. The backslash breaks a preg_grep() at line 364 in views.module. This was pretty hard to find.
While the cause is a misformed user input, it might be a good idea to escape the strings there.
I do not think it has security implications though.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views-misformed_path_in_page_breaks_views_menu-1733464-5.patch | 772 bytes | andrew answer |
| #1 | views-1733464-regex-double-backslashes.patch | 715 bytes | ygerasimov |
Comments
Comment #1
ygerasimov commentedHere is patch to replace backslash with double backslashes.
Comment #2
jkurrle commentedI was getting a similar message with version 7.x-3.7 on line 418 of the views module. (Warning: preg_grep(): Unknown modifier 'o' in views_menu_alter() line 418) Turns out line 417 was using a hashmark (#) as a preg_replace delimiter. I replaced the hashmarks with cent signs (¢ - ascii 155) and the issue went away.
Line 417 before:
Line 417 after:
Maybe this will help someone else...
Comment #3
labboy0276 commentedI added a more universal solution to the issue in #2: https://www.drupal.org/node/2694365
Comment #4
chris matthews commentedThe 6 year old patch to views.module does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.
Comment #5
andrew answer commentedPatch rerolled.