I ditto Masem's answer (glad I hit Refresh before replying :).

I think you really should use a database for this. Whatever you do, don't have the CGI params determine what the filename is... I've been able to use shopping cart scripts to look at arbitrary files on their system including /etc/passwd and the script itself by using a URL like

http://foo.com/cgi-bin/cart.pl?....&FILE=../../../cgi-bin/cart.pl

basically getting arbitrary information from their system. (I let them know through a throw-away hotmail account and surfed the site through safeweb.com -- be careful when telling people you were probing their shopping cart)

Like Masem said avoid putting information into a cookie, another reason being so that people can't set their prices arbitrarily. If you're processing orders "in house", then you might be more likely to overlook that somebody gave themself a rebate. Anyway, if you can avoid cookies, you should try to.


In reply to Re: Re: Crumbling Cookies, Passed Page Values, and File Handling by kwoff
in thread Crumbling Cookies, Passed Page Values, and File Handling by chaoticset

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.