Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13564 closed defect (fixed)

JOSM remote control crash

Reported by: jean.navarro@… Owned by: team
Priority: normal Milestone: 16.10
Component: Core remotecontrol Version: tested
Keywords: wikipedia Cc:

Description

What steps will reproduce the problem?

  1. start Josm
  2. go to : https://josm.openstreetmap.de/wiki/Help/Preferences/RemoteControl#addtags
  3. clic on the first link

What is the expected result?

add a node and a list of tag in josm

What happens instead?

error : illegal character. it seem that pipe is the cause ?

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

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-09-06 00:16:07 +0200 (Tue, 06 Sep 2016)
Build-Date:2016-09-05 22:21:00
Revision:10966
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10966 fr) Linux Ubuntu 16.04.1 LTS
Memory Usage: 391 MB / 1730 MB (222 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-8-jre:amd64-8u91-b14-3ubuntu1~16.04.1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-6

Plugins:
+ apache-commons (32699)
+ buildings_tools (32796)
+ editgpx (32699)
+ ejml (32680)
+ geotools (32813)
+ jts (32699)
+ utilsplugin2 (32815)


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: RemoteControl request processor (39)
java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in query at index 52: /load_and_zoom?addtags=wikipedia:de=Wei%C3%9Fe_Gasse|maxspeed=5&select=way23071688,way23076176,way23076177,&left=13.739727546842&right=13.740890970188&top=51.049987191025&bottom=51.048466954325
	at org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.parseArgs(RequestHandler.java:197)
	at org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.setUrl(RequestHandler.java:184)
	at org.openstreetmap.josm.io.remotecontrol.RequestProcessor.run(RequestProcessor.java:233)
Caused by: java.net.URISyntaxException: Illegal character in query at index 52: /load_and_zoom?addtags=wikipedia:de=Wei%C3%9Fe_Gasse|maxspeed=5&select=way23071688,way23076176,way23076177,&left=13.739727546842&right=13.740890970188&top=51.049987191025&bottom=51.048466954325
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.parseHierarchical(URI.java:3111)
	at java.net.URI$Parser.parse(URI.java:3063)
	at java.net.URI.<init>(URI.java:588)
	at org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.parseArgs(RequestHandler.java:195)
	... 2 more

Attachments (0)

Change History (11)

comment:1 by jean.navarro@…, 8 years ago

Keywords: template_report removed

comment:2 by Don-vip, 8 years ago

Keywords: wikipedia added

comment:3 by Don-vip, 8 years ago

In 10973/josm:

see #13564 - proper management of invalid URLs in remote control handlers + add unit test

comment:4 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 10974/josm:

fix #13564 - add unit test with valid URL

comment:5 by Don-vip, 8 years ago

Milestone: 16.09

comment:6 by jean.navarro@…, 8 years ago

Resolution: fixed
Status: closedreopened

sorry but the pipe character is not an invalid character -> see : https://josm.openstreetmap.de/wiki/Help/Preferences/RemoteControl
section load_object or add_node or add_way
the pipe character is use for addtags :

Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See details.

a new exemple for a good url :

http://localhost:8111/add_node?lon=5.493581&lat=44.185362&addtags=ref:mhs=PA00116886|name=Eglise|heritage:operator=mhs|heritage=3|mhs:inscription_date=1926-07-13%20|source:heritage=data.gouv.fr,%20Minist%C3%A8re%20de%20la%20Culture%20-%202016

the fix now give an http error 400 : Bad Request
java.net.URISyntaxException: Illegal character in query at index 63: /add_node?lon=5.493581&lat=44.185362&addtags=ref:mhs=PA00116886|name=Eglise|heritage:operator=mhs|heritage=3|mhs:inscription_date=1926-07-13%20|source:heritage=data.gouv.fr,%20Minist%C3%A8re%20de%20la%20Culture%20-%202016

the add_node, add_way fonctions don't work !

jean

comment:7 by Don-vip, 8 years ago

Resolution: fixed
Status: reopenedclosed

Pipe is a valid character, but it must be url-encoded to work, as per RFC 2396, see :

   Other characters are excluded because gateways and other transport
   agents are known to sometimes modify such characters, or they are
   used as delimiters.

   unwise      = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"

   Data corresponding to excluded characters must be escaped in order to
   be properly represented within a URI.

comment:8 by jean.navarro@…, 8 years ago

Oups !
thanks for infos
sorry for noise.

jean

comment:9 by simon04, 8 years ago

Milestone: 16.0916.10

Milestone renamed

comment:10 by simon04, 8 years ago

Ticket #13905 has been marked as a duplicate of this ticket.

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.