[API] data loss caused by changed behaviour of custom user_field update


(Philipp Daniels) #1

For example I have configured two custom user_fields: 1 and 2
Executing the following request to update custom user_field 2 clears the content of the custom user_field 1:
curl -X PUT -d 'user_fields[2]=Lorem ipsum' http://discourse.example.com/users/john-doe.json?api_key=test_d7fd0429940&api_username=test_user

In the past this request only changed the content of custom user_field 2 and the content of custom user_field 1 was unchanged.

Was this change of the custom user_fields update intentional?
Tested with Discourse version 1.8.10


(Philipp Daniels) #2

Added pull request with tests for this bug: Proof-of-concept: Data loss on update of single user_field by phaldan · Pull Request #5438 · discourse/discourse · GitHub


(Alan Tan) #3

Fixed in

Thank you @PhALDan.test for providing the test case.


(Alan Tan) #4

This topic was automatically closed after 5 days. New replies are no longer allowed.