Commander icon indicating copy to clipboard operation
Commander copied to clipboard

REST API - Quotes in parameters don't work

Open mxmorin opened this issue 9 months ago • 1 comments

With the rest api, creating a record (record-add) with the value of the folder, title or password enclosed with escaped quotes does not work. Pass parameters between single quotes create values with quotes Ex 1 :

{
    "command": "record-add --title=\"My secret\" --record-type=login --folder=\"MyFolder/my subfolder\" login=username password=$GEN:dice,5"
}

Result :

{
    "data": null,
    "status": "success"
}

Ex 2 :

{
    "command": "record-add --title=Mysecret --record-type=login --folder=\"MyFolder/my subfolder\" login=username password=$GEN:dice,5"
}

Result :

{
    "error": "Command execution failed: Expected: <field>=<value>, got: subfolder&quot;; Missing `=`",
    "success": false
}

Ex 3 :

{
    "command": "record-add --title='Mysecret' --record-type=login --folder='MyFolder/my subfolder' login=username password=$GEN:dice,5"
}

Result :

Image

mxmorin avatar Apr 23 '25 08:04 mxmorin

We are already working on a fix for this, it will be hopefully be released this week among a few other changes.

craiglurey avatar Apr 23 '25 15:04 craiglurey

It's been fixed in v17.0.18

sk-keeper avatar May 27 '25 14:05 sk-keeper