milesj / utility

[Deprecated] A CakePHP plugin for common utility classes.
MIT License
69 stars 24 forks source link

AutoLogin component might be causing incorrect 301 redirects #31

Closed PhantomWatson closed 10 years ago

PhantomWatson commented 10 years ago

I was trying to troubleshoot why a few of my CakePHP sites seemed to be causing Firefox to cache 301 redirects between unrelated pages for no reason, and I narrowed it down to probably being AutoLogin and the way Auth.redirect is stored in CakePHP's session. But I'd like someone who understands the codebase better than me to look into this as well, because I could be totally wrong.

The line in question in the AutoLogin component is currently line 177, and my reasoning is at the bottom of this question on webmasters.StackExchange after "Any login pages that redirect on success?".

If I'm right, it seems like a quick fix would be to change AutoLogin's 301 redirect to a 302 redirect.

milesj commented 10 years ago

That should probably be a 302 regardless as a 301 makes no sense in this context. Might have been a typo :O

PhantomWatson commented 10 years ago

I'll fire out a pull request.

By the way, why does the repository's description start with "Deprecated"? It seems like it's still being maintained.

milesj commented 10 years ago

It's deprecated in the sense that there will be no more further development, only minor bug fixes (for a limited time). Once Cake 3.0 comes out, this project will be fully deprecated.