You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an entry with double quotes (i.e: Oui et j'ai un "petit" niveau (appels api, état global avec VueX, évènements)
Add some entries and save
Visit the poll and change the state of the entry with double quotes.
Save your answers
Expected behaviour
The entry with changed state should have its new state saved
Actual behaviour
Status of the "double quoted string" did not change
Server configuration
Operating system:
Ubuntu 16.04 Web server:
Apache 2 Database:
Mysql PHP version:
7 Nextcloud version: (see Nextcloud admin page)
13.0.2 Where did you install Nextcloud from:
I don't remember Signing status:
No errors have been found.
Additional informations:
Going to "edit" the poll shows an empty list of options and the JS console states:
SyntaxError: JSON.parse: expected ',' or ']' after array element at line 1 column 9 of the JSON data
After manually removing the quotes with a mysql client, everything went fine.
The issue comes from the fact that when a poll is submitted, the raw values are sent to the server, unescaped, and when the server creates JSON for the edit form, the same thing happens...:
Data sent when voting for two options; foo "foo" and bar bar
changed | true
-- | --
dates | ["foo+","bar bar"] // good strings would have been ["foo+\"foo\"", "bar bar"]
pollId | 4
receiveNotifications | false
types | [1,1]
userId | admin
Possible things to do to correct this:
Escape the strings before they are sent to server (and from server to edit form)
better: send ids to server instead of strings...
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Oui et j'ai un "petit" niveau (appels api, état global avec VueX, évènements)
Expected behaviour
The entry with changed state should have its new state saved
Actual behaviour
Status of the "double quoted string" did not change
Server configuration
Operating system:
Ubuntu 16.04
Web server:
Apache 2
Database:
Mysql
PHP version:
7
Nextcloud version: (see Nextcloud admin page)
13.0.2
Where did you install Nextcloud from:
I don't remember
Signing status:
Additional informations:
Going to "edit" the poll shows an empty list of options and the JS console states:
After manually removing the quotes with a mysql client, everything went fine.
The issue comes from the fact that when a poll is submitted, the raw values are sent to the server, unescaped, and when the server creates JSON for the edit form, the same thing happens...:
Data sent when voting for two options;
foo "foo"
andbar bar
Possible things to do to correct this:
The text was updated successfully, but these errors were encountered: