Skip to content

Commit

Permalink
Item12839: require authentication calling the rest handler
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/UpdateAttachmentsPlugin@17654 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed May 7, 2014
1 parent 2f644d0 commit 3c7d4ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions data/System/UpdateAttachmentsPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ It is strongly recommended to disable =$Foswiki::cfg{AutoAttachPubFiles}=. The p
| Plugin Version: | %$VERSION% |
| Plugin Release: | %$RELEASE% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 3.01: | Foswikitask:Item12839: require authentication when calling the REST handler |
| 3.00: | Foswikitask:Item12891: general code cleanup; added modes to update individual topics (Foswiki:Main.MichaelDaum); \
Foswikitask:Item11844: exclude a few well known auto-generated attachments and thumnails |
| 2.0.2: | Foswikitask:Item10630: Config.spec really is necessary |
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Plugins/UpdateAttachmentsPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use warnings;
use Foswiki::Plugins ();
use Foswiki::Func ();

our $VERSION = '3.00';
our $RELEASE = '3.00';
our $VERSION = '3.01';
our $RELEASE = '3.01';
our $SHORTDESCRIPTION = 'A batched alternative to AutoAttachments (adds and removes attachements)';
our $NO_PREFS_IN_TOPIC = 1;
our $core;
Expand All @@ -30,7 +30,7 @@ sub initPlugin {
return 0;
}

Foswiki::Func::registerRESTHandler('update', sub { core->restUpdate(@_) }, authenticate => 0);
Foswiki::Func::registerRESTHandler('update', sub { core->restUpdate(@_) }, authenticate => 1);

#force autoattach off
$Foswiki::cfg{AutoAttachPubFiles} = 0;
Expand Down

0 comments on commit 3c7d4ce

Please sign in to comment.