Modify

Opened 2 weeks ago

Closed 8 days ago

Last modified 3 days ago

#24480 closed enhancement (fixed)

19437 introduced client side tag checking impacting private server.

Reported by: Lego <liamc70@…> Owned by: team
Priority: normal Milestone: 25.10
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Add a tag on way with more than 255 characters on a server that allows > 255 maxlength.
  2. Click upload changes

What is the expected result?

Have the server throw an error (if public OSM), work fine on a private OSM if > 255 characters allowed.

What happens instead?

Throws an error saying tag value too long.

Please provide any additional information below. Attach a screenshot if possible.

I have a private server that allows more than 255 characters on nodes and ways. 19437 has added length checking client side with no way to switch it off or change the maxlength allowed.

I was wondering if an option to switch off client side tag length checking in advanced settings please?

The change tag length change was also not in the changelog.

Revision:19437
Build-Date:2025-08-26

Identification: JOSM/1.5 (19437 en_GB) Windows 11 64-Bit
OS Build number: Windows 10 Pro 24H2 (26100)
Memory Usage: 352 MB / 11832 MB (52 MB allocated, but free)
Java version: 21.0.8+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.25×1.25)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_GB
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19439, -XX:MaxRAMPercentage=75.0, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Last errors/warnings:
- 00000.733 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF'
- 00000.736 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.737 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00001.602 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available

OSM API: http://drp-josm.local.home:31337/api

Attachments (1)

24480.patch (4.9 KB ) - added by GerdP 2 weeks ago.
implement preference to disable the maxlength check of tag values on upload

Download all attachments as: .zip

Change History (16)

comment:1 by GerdP, 2 weeks ago

The check was meant to work since many years, but it was not implemented correctly. See #24446 which fixed this bug.
I think it would be possible to change the code so that it checks the limit which is reported by the server instead of using a hard coded value.

comment:2 by GerdP, 2 weeks ago

An alternative would be to remove the check in JOSM, as I already suggested in #24446

comment:3 by stoecker, 2 weeks ago

We can make the maxlength a hidden option.

comment:4 by Lego <liamc70@…>, 2 weeks ago

Thank you for the replies both.

Just having an option in "Advanced Preferences" default to 255 would work, as I would just changed it to 65535.

by GerdP, 2 weeks ago

Attachment: 24480.patch added

implement preference to disable the maxlength check of tag values on upload

comment:5 by GerdP, 2 weeks ago

I learned that the maximum length of tag keys or values is not reported by the server using https://api.openstreetmap.org/api/0.6/capabilities. So the patch simply implements a boolean preference upload.check-maxlength-value which is true by default.

If a variable integer value for the length is preferred we should use that also in the validator, right?

in reply to:  5 comment:6 by stoecker, 2 weeks ago

If a variable integer value for the length is preferred we should use that also in the validator, right?

Yes. I'd do both. Your check and the variable. Hidden variables do (usually) no harm.

comment:7 by anonymous, 12 days ago

Thank you

comment:8 by GerdP, 8 days ago

Resolution: fixed
Status: newclosed

In 19443/josm:

fix #24480: 19437 introduced client side tag checking impacting private server.

  • implement boolean preference upload.check-maxlength-value which allows to disable the maxlength check of tag values on upload

comment:9 by GerdP, 8 days ago

Milestone: 25.10

I think the preference for the length value should be a different ticket.

comment:10 by gaben, 4 days ago

@GerdP, can you please document the new preference in the wiki?

comment:11 by GerdP, 4 days ago

Do you have a link for me?

comment:13 by GerdP, 4 days ago

OK, I'll try it tomorrow.

comment:15 by gaben, 3 days ago

Thanks! :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.