stop using REMOTE_ADDR
authorJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:32:20 +0000 (16:32 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:35:51 +0000 (16:35 -0400)
commit4292802ee5f93f7ec7644c5d0a30f7ffeb95e566
tree603a4a6f366f411b2ef1909825d400db6ad65bc7
parentb4a43406f61b7ff9ab77d242edf4d59369ac8596
stop using REMOTE_ADDR

Everywhere that REMOTE_ADDR was used, a session object is available, so
instead use its remote_addr method.

In IkiWiki::Receive, stop setting a dummy REMOTE_ADDR.

Note that it's possible for a session cookie to be obtained using one IP
address, and then used from another IP. In this case, the first IP will now
be used. I think that should be ok.
12 files changed:
IkiWiki/CGI.pm
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/blogspam.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/lockedit.pm
IkiWiki/Plugin/moderatedcomments.pm
IkiWiki/Plugin/passwordauth.pm
IkiWiki/Plugin/poll.pm
IkiWiki/Plugin/remove.pm
IkiWiki/Plugin/rename.pm
IkiWiki/Receive.pm