Is it safe to process code within the same page?

Ask about a PHP problem here.
Post Reply
bluebird
Posts: 8
Joined: Fri Mar 09, 2012 3:00 am

Is it safe to process code within the same page?

Post by bluebird »

Hi,

I have heard it was unsafe to redirect users to the same page while having code processed at the top of the page's code.
For instance, with a form, the action url would be empty and the user's data processed at the top of the same page. If that is unsafe, then I should create another page to process the output.

Thanks in advance!
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: Is it safe to process code within the same page?

Post by bowersbros »

Where did you hear that was unsafe?

As long as you did proper checks for if the data has been sent and then proper validation as far as i'm aware, its the same.
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Is it safe to process code within the same page?

Post by jacek »

It should not make a difference where the processing is done, it's the actual processing that may open up a vulnerability.
Image
Post Reply