bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.17k stars 432 forks source link

Birthdate is erased when clients authenticated with app passwords update preferences #2555

Closed mikeyclarke closed 3 months ago

mikeyclarke commented 3 months ago

Describe the bug

The app.bsky.actor.putPreferences endpoint appears to delete the app.bsky.actor.defs.personalDetailsPref preference when the client is authenticated with an app password.

To Reproduce

Steps to reproduce the behavior:

  1. Using the Bluesky app/website set a birthdate in your moderation settings
  2. Use a client authenticated with an app password to change a preference

Expected behavior

Your birthdate remains.

Actual behavior

Your birthdate is removed and must be re-entered again.

Details

I noticed this whilst adding content safety settings to my own app but I’ve also tried changing moderation settings in the Graysky app and it has the same effect.

Additional context

It looks like #1624 deliberately excluded sending through the birthdate preference in the app.bsky.actor.getPreferences response for privacy reasons but the put endpoint erases preferences that aren’t supplied to it, hence the bug.

pfrazee commented 3 months ago

Ah lovely. @dholms I figure we either need to make the backend preserve the app.bsky.actor.defs.personalDetailsPref item if it's not included in the put, or we need to drop the app password filter