[openstreetmap/openstreetmap-website] Allow `user/preferences` values up to 10_000 (PR #6399)

Tobias notifications at github.com
Fri Sep 19 12:24:15 UTC 2025


### Description

Fixes https://github.com/openstreetmap/openstreetmap-website/issues/6297

The goal is to increase the limit of the `user/preferences` API values.
I picket 10k which is what we use for user blocks and should be enough to add more complex data.

<details><summary>Other limits</summary>
<p>

User descriptions can be up to 65,536 characters
Diary comments can be up to 65,536 characters
User block reasons can be up to 10,000 characters
Note comments can be up to 2,000 characters

</p>
</details> 


### How has this been tested?

I tested it with the demo page from https://gist.github.com/tordans/94481e6336e8c34f258c677350fc2e77 which uses https://github.com/osmlab/osm-api-js to authenticate against localhost 3001 (hard coded) with a local oAuth App (hardcoded) and then runs two test cases against the preferences endpoint.

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6399

-- Commit Summary --

  * Allow `user/preferences` values up to 10_000

-- File Changes --

    M app/models/user_preference.rb (3)
    M test/models/user_preference_test.rb (63)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6399.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6399.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6399
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6399 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250919/fed647b3/attachment.htm>


More information about the rails-dev mailing list