JKB
JKB

Reputation: 39

Restrict changing parameters in address bar

The jsp page is being accessed from an external app with the parameter that is being sent to the page from the address bar is emailaddress. Once the external app references this jsp page, there is a non-editable text field which gets populated with the value of this parameter.

My question is that is there anyway I can make the parameter in address bar in-editable or just not visible to anyone so that nobody can change it.

Upvotes: 1

Views: 154

Answers (1)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340933

The answer is: don't. Do your sanity and security checks on the server side, where no-one can tamper the data. The client has to be authenticated and authorized to send given parameters. You cannot simply rely on the fact that browser or some clever JavaScript will protect you.

You can use POST instead of GET parameters, but this only hides, not protects the data.

Upvotes: 2

Related Questions