owncloud / testing

🔧 app for testing ownCloud
GNU Affero General Public License v3.0
3 stars 4 forks source link

Allow quoted strings in occ commands #33

Closed phil-davis closed 6 years ago

phil-davis commented 6 years ago

Description

We need to be able to specify empty values in occ commands, or values containing spaces:

occ config:app:set someapp somesetting --value ''
occ config:app:set someapp somesetting --value ' '
occ config:app:set someapp somesetting --value 'Phil Davis'

The current testing app code correctly detects these quoted strings, but then it does escapeshellarg on them and the value gets set to the whole literal string, including the single quote at each end.

If we send those sort of values without quotes, then it looks like empty space, no space or multiple values in the command line.

So if an element is already surrounded by single quotes, then do not escapeshellarg it.

Checklist: