XML-API icon indicating copy to clipboard operation
XML-API copied to clipboard

Adding user session check to exec.cgi

Open psytester opened this issue 6 years ago • 1 comments

This change adds a first version of user session check and validation. Login in WegUI to get a valid sessionID to be able to call /addons/xmlapi/exec.cgi?sid=....

ToDo: User authorisation level check (Admin, User or Guest) needs to be added. Currently the guest level can use the script, too. But better a valid login session than nothing.

Disclaimer: I just added the login session check as a kind of proof of concept. I did not check any negative impact to existing tools or scripts.

Both TCL scripts were copied from https://github.com/rdmtc/RedMatic/tree/master/addon_files/redmatic/lib/

psytester avatar May 14 '19 19:05 psytester

First PR to issue #29

psytester avatar May 14 '19 19:05 psytester

This PR is obsolete since within the upcoming v2 version of XML-API a token-based authentication scheme had been added which should prevent these kind of issues.

jens-maus avatar Sep 22 '23 12:09 jens-maus