Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Catalyst Redirect Hints?

by saberworks (Curate)
on Mar 25, 2009 at 22:00 UTC ( #753271=note: print w/ replies, xml ) Need Help??


in reply to Re: Catalyst Redirect Hints?
in thread Catalyst Redirect Hints?

The problem with this is that you can't present the original form with the values filled in if the form contains file upload widgets or password fields. Browsers often refuse to fill those out because you can be tricked into uploading files you didn't intend to, /etc/passwd or something.

But storing all the posted content and then forwarding to the processing page for the original form may work somewhat. Usually when you hit a protected page and you're not logged in, you get forwarded to the login page (via an internal or external redirect). You will have to ensure it's an internal redirect so you still have access to the POST content or don't redirect at all, intercept the request and present the login form at the original URL they requested.


Comment on Re^2: Catalyst Redirect Hints?
Re^3: Catalyst Redirect Hints?
by shmem (Canon) on Mar 25, 2009 at 22:52 UTC

    Well it depends on the design of the app and the data being POSTed, of course. I'd not serve a file upload form nor process it without proper authentication, unless I'd purpose being flooded with SPAM of all sorts.

    But the requirement "allow POSTing first, authenticate later" looks a bit weird to me, I have to confess.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://753271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-10-02 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (65 votes), past polls