开发者

Python CGI how to save requested information securely?

I have a web page that uses a Python cgi script to store requested information for later retrieval by me. As an example, the web page has a text box that asks "What is your name?" When the user inputs his name and hits the submit button, the web page calls the Python cgi script which writes the user's name to mytextf开发者_运维问答ile.txt on the web site. The problem is that if anyone goes to www.mydomain.com/mytextfile.txt, they can see all of the information written to the text file. Is there a solution to this? Or am I using the wrong tool? Thanks for your time.


Definitely the wrong tool. Multiple times.

  1. Store the file outside of the document root.
  2. Store a key to the file in the user's session.
  3. Use a web framework.
  4. Use WSGI.


Store it outside the document root.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜