Item10321: command line invocations should be processed as if it was a POST
Priority: Enhancement
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: bin/rest (or any bin)
Branches:
Command line invocations of foswiki/bin scripts should behave as if they were POSTs instead of GETs and be assumed to be authenticated if
AdminUser is specified.
Reasoning
In working around a (perceived) limitation with
WorkflowPlugin, I attempted to create a shell script that would run
cd foswiki/bin ; ./rest -user AdminUser /WorkflowPlugin/changeState \
topic=$someweb.$sometopic \
WORKFLOWACTION=Some%Action \
WORKFLOWSTATE=SOMESPECIFICSTATE
but that created a security (not allowed to GET) error so instead I had to use:
curl -u -s User:Password https://wiki.some.tld/bin/rest/WorkflowPlugin/changeState \
-d topic=$someweb.$sometopic \
-d WORKFLOWACTION=Some%Action \
-d WORKFLOWSTATE=SOMESPECIFICSTATE
which necessitated placing the password for the user in the script.
--
KiltBear - 04 Feb 2011
This should be fixed in 1.2. UI::Rest bypasses the POST check when running from the CLI.
--
GeorgeClark - 07 Jan 2015