From 090e12c1f7141a6d5a25014fc33e9b1cc382c0b7 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 12 Feb 2007 21:13:58 +0000 Subject: [PATCH] Stop anonymous uploads git-svn-id: http://svn.simon-cozens.org/memories/trunk@31 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Memories.pm | 1 + Memories/Photo.pm | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Memories.pm b/Memories.pm index 0aebf11..8536d17 100644 --- a/Memories.pm +++ b/Memories.pm @@ -91,6 +91,7 @@ sub authenticate { my ($self, $r) = @_; return DECLINED if $self->path =~/static|store/; # XXX $r->get_user; + if (!$r->user and $self->path =~ /upload/) { $r->template("login"); } return OK; } diff --git a/Memories/Photo.pm b/Memories/Photo.pm index eef3019..57a53c4 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -45,7 +45,6 @@ sub do_upload :Exported { my ($self, $r) = @_; my %upload = $r->upload("photo"); - # XXX Stop anonymous uploads! my $photo = $self->create({ uploader => $r->user, uploaded => Time::Piece->new(), -- 2.39.5