openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.22k stars 920 forks source link

notes.json endpoint returns empty (redacted?) notes #5379

Closed pietervdvn closed 9 hours ago

pietervdvn commented 9 hours ago

URL

GET https://api.openstreetmap.org/api/0.6/notes.json?limit=10000&closed=7&bbox=4.21875,50.73645513701065,4.5703125,50.95842672335991

How to reproduce the issue?

Query for https://api.openstreetmap.org/api/0.6/notes.json?limit=10000&closed=7&bbox=4.21875,50.73645513701065,4.5703125,50.95842672335991 via the browser. This will include note with URL: https://www.openstreetmap.org/note/4541086 and content:

{
"id":4541086,
"url":"https://api.openstreetmap.org/api/0.6/notes/4541086.json",
"comment_url":"https://api.openstreetmap.org/api/0.6/notes/4541086/comment.json",
"close_url":"https://api.openstreetmap.org/api/0.6/notes/4541086/close.json",
"date_created":"2024-12-02 15:45:33 UTC",
"status":"open",
"comments":[]}}

Very noticeable is that comments is an empty list. In normal circumstances, these should contain at least the first comment of the user whom opened the note.

I suspect that this comment got redacted because of spam or personal data.

Also note that visiting the URL of the note (as linked above) results in an error page.

My request is to not include these rogue notes in this endpoint. I'm currently filtering them out client side.

Screenshot(s) or anything else?

Originally reported here: https://github.com/pietervdvn/MapComplete/issues/2299

tomhughes commented 9 hours ago

More likely the user has been deleted and there's already a ticket for that.

AntonKhorev commented 9 hours ago

2146

tomhughes commented 9 hours ago

This is just the API version of #2146.