Mihir wrote:
> I am a beginner to perl. I have a setup a page on an apache server
> which has its addr like
> http:// <name of server> :8088/cgi-bin/names.pl?id1=xx&id2=yy
>
> This page contains a list of names of a few friends. This page is made
> when a friend of mine registers in my guestbook. Now the question is
> that this above address is displayed in the browser everytime a friend
> accesses their account. So he/she can see their own page but can a
> friend of mine get to this page and somehow modify its contents and
> see the list of all my friends that exist and show up when the xx
> value of id1 or id2 change?
I'd create a sha1-hash of "xx_yy", like
...
use Digest::SHA1 qw(sha1_hex);
...
my $friends_name = "xx";
my $friends_email= "yy";
$newid = sha1_hex( $friends_name . '_' . $friends_email );
...
// now: $newid = "1df1f88fa38f0906cf09da207e1c4ae005a146bd";
...
gives then:
http:// <name of server> :8088/cgi-bin/names.pl?id=1df1f88fa38f0906cf09da207e1c4ae005a146 bd
or (with working /path_info/)
http:// <name of server> :8088/cgi-bin/names.pl/1df1f88fa38f0906cf09da207e1c4ae005a146bd
of course, the "ID" of your people will be this
key from now on.But nobody ever on earth will
be able to make guesses
Regards
M.