hide information from the view "source"

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


It is the problem with my entire Perl code; I wrote the Perl script to
retrieve the questions and answers from the database. It is possible
that the user can view "source" and retrieve the questions and answer
from the "view source" which is the pain html. At this point, I want
to convert my program into Java Applet, it is solve the problems. But,
before I do that, I hope that anyone here can give me some hint to
solve my problem.

Thank you,

Re: hide information from the view "source"

Quoted text here. Click to load it

I am assuming that you are talking about a web application (you didn't
say), using CGI (you didn't say), where your Perl code creates an HTTP
response aka web page.
And the problem is (you didn't say) that you coded all questions and
answers into that single HTTP response object and thus a user can see
them when reading the HTTP response directly ("View Source").

You do not have a Perl problem. You would have exactly the same problem
no matter which programming language you had chosen to write the CGI
Also you do not have a CGI or programming problem in general, either.
Your problem is caused by a poor design of your system.

Quoted text here. Click to load it

The solution is very simple: don't do that. Do not code all questions
and answers into the HTTP response. Instead do round-trips to the web
server for each answer and check the answer server-side only. Yes, that
does increase traffic quite a bit. Yes, it does introduce potentially
significant delays for each round-trip. But is the only way to not hand
out all questions and answers to the user because as soon as you send
them the user can read them one way or the other.

Or you might try to encode/encrypt the data and have some client-side
process to decode it. That may deter the casual user, but it won't stop
a dedicated cracker because after all he is supposed to see the data in
clear text eventually, therefore you cannot block access to it totally.


Re: hide information from the view "source"

kwan wrote:

Quoted text here. Click to load it

You cannot stop somebody from viewing the source.

Not that this is perl related of course.

Brian Wakem

Re: hide information from the view "source"

Quoted text here. Click to load it

That does NOT solve the problem!

Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"

Site Timeline