Hide ajax server-side php script in sourcecode - Security Issue

Hide ajax server-side php script in sourcecode - Security Issue

PaladiumPaladium Posts: 3Questions: 0Answers: 0
edited October 2011 in General
Hi there,

is there a way to hide the ajax-source php-file from which i gather the data? Right now everyone who looks into the sourcecode can see my datasource-file and can access the data. This is a big security issue!

Please help.
Markus

Replies

  • GregPGregP Posts: 500Questions: 10Answers: 0
    Being able to see a resource in source is the defacto standard of the web. If security is an issue, you need to be using server sessions. Then when a browser requests the resource, you first check to see if it has a valid session. If not, you simply don't return the resource.

    Anything else would be a hack.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    short of encoding the data and having it decode in javascript, no.

    and anyone running your page will have access to the decoding key and/or algorithm, in which case it's not really secure either.
This discussion has been closed.