openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.34k stars 1.2k forks source link

Users are able to upload tagless nodes #9553

Open k-yle opened 1 year ago

k-yle commented 1 year ago

How to reproduce the issue?

I've noticed several changesets where users have somehow created nodes with no tags. iD normally prevents this from happening. These examples don't even have a warnings:*:* tag on the changeset.... no idea how they managed this

example 1, example 2, example 3,

I haven't deleted this node yet, which one of them: n10743657248

Which deployed environments do you see the issue in?

not sure, I can't reproduce the issue

What version numbers does this issue effect?

2.25.1, zh-CN

Which browsers are you seeing this problem on?

not sure, I can't reproduce the issue

k-yle commented 9 months ago

Possibly related: An iD user created this changeset, which appears to be empty: https://osm.org/changeset/144855050 This changeset has warnings:missing_tag:any=2, but those 2 features are not present in the uploaded changeset.

Dimitar5555 commented 9 months ago

I've managed to reproduce this issue accidentally (see node/11413539824). I used an ancient computer (WinXP, Pentium 4, 1 GB of RAM) with a browser that shouldn't be able to run on it (MyPal 68, which is equivalent to Firefox 68). The CPU is at 100% when doing anything in the editor. As expected, it runs like a potato (or PowerPoint presentation at times).

The problem seems to be that the CPU takes far too much time to validate everything and it just "forgets" the current errors while validating. They were displayed in the upload dialog at some point but when uploading there were no errors or warnings.

It should be possible to reproduce it in a VM with low specs regardless of browser and OS. Just make sure to bottleneck the CPU.

Steps for replicating it (tried only once, may or may not always work):

  1. Do lots of edits (add polygons, edit large MPs)
  2. Create a node
  3. Apply some preset to it
  4. (see how much time is needs for the "no tags" error to disappear
  5. Remove the tags and try to upload (or create another new node and try to upload)

Possible solutions may be to reduce how often the validator is executed, try to optimise some validators or to add issues cache.

danieldegroot2 commented 1 month ago

I had previously found a changeset uploading an empty node. I have closed the issue in favour of this one.