You are here: Foswiki>Tasks Web>Item10321 (07 Jan 2015, GeorgeClark)Edit Attach

Item10321: command line invocations should be processed as if it was a POST

pencil
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:
Reported By: KiltBear
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary command line invocations should be processed as if it was a POST
ReportedBy KiltBear
Codebase 1.1.2
SVN Range
AppliesTo Engine
Component bin/rest (or any bin)
Priority Enhancement
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 07 Jan 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy