I have a php application which redirects to the login page if the session is timed out.
I’d like the login page to redirect the user to his previous location once relogged.
Ideally the user would recover even his complete request.
I thought of encoding the whole request within the login form like:
<input name="previous_request"
value="<?php base64_encode(gzcompress(serialize($_REQUEST))) ?>" />
But not sure if it’s very secure or if it is advised.
I’m wondering what are the best practices for that.
Is is a common practice to serialize the entire request for the “relogging” ?
I would have done so
When the user is redirected to reloging, as you said serialize $ _REQUEST will write it into the database and the page will send its md5. So I think it will be safer