cakephp/cakephp — pull request #368 by TooMuchCaffeine (2011-12-09 20:13:49+00:00)
Title: Default charset and collation

Hello core-devs.

It took me awhile to get to the source of problem.
Two conditions need to be met in order this issue to pop up
a) Default db collation is case insensitive (which is default in mysql iirc)
b) An action name matches controller name

For example:
PostsController aco alias = Posts
OtherController::posts() aco alias = posts

During permissions look up for OtherController::posts there will be two 'trees' returned
controllers/Posts
controllers/Other/posts
as a result access denied even if it is allowed

setting default collation to case sensitive solves it
of course one might not name actions same names as controllers or set collation manually
I also realize that this is mysql specific and probably will cause an error with postgresql or other db.
Maybe there should be separate files for different databases?