Problem/Motivation
It is possible to create case nonsensitive paths in menu_link but not in menu_router. When menu_router rebuilds it gives and duplicate error on path field (primary key)
Steps to reproduce
Create 2 panels with the same path but in different case register.
Like /one and /One
After this any other panels with give just 404 but should open just created page. The problem is with menu_router and duplicate primary key fail when trying to rebuild menu.
Proposed resolution
1. make path case non sensitive in DB but we still have the problem with non uft-8 paths.
2. modify menu_link save and make only lowercase path only
3. add different primary key in menu_router and make path compare unique check in php
Remaining tasks
Need feedback on solution. The solution #3 looks ok for me.
User interface changes
To reproduce the issue the panels module and page manager need to be installed.
API changes
Affects all menu related modules
Comments
Comment #1
amorsent commented( D6 at least, I have not tested in D7 )
Though the menu router is case sensitive, it seems the page cache is not. This means that the first time an anonymous user accesses a menu path with the wrong case, it will get cached as "Page Not Found" for even the correct case.
It seems to me that this is a security issue, since this would make it possible to launch a DOS attack on a site by simply accessing paths with the wrong case.
Comment #2
amorsent commented( D6 )
Actually ... I'm not quite sure where the case sensitivity is actually coming from in the first place.
In menu_get_item the query that locates the menu_router item seems to give me the same result either way.