Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15887 closed defect (fixed)

crash on invalid url in selection tooltip

Reported by: marc_marc Owned by: team
Priority: normal Milestone: 18.02
Component: Core Version:
Keywords: template_report linux html Cc:

Description

What steps will reproduce the problem?

  1. load node 993840754
  2. right clic on url

What is the expected result?

open valid part of the url or show a popup "invalid url"

What happens instead?

crash

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: 2018-01-28 23:08:56 +0100 (Sun, 28 Jan 2018)
Build-Date:2018-01-28 22:25:44
Revision:13367
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13367 fr) Linux CentOS Linux 7 (Core)
Memory Usage: 1269 MB / 1717 MB (67 MB allocated, but free)
Java version: 1.8.0_161-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900
Maximum Screen Size: 1600x900
Java package: java-1.8.0-openjdk:x86_64-1.8.0.161
WebStart package: icedtea-web:x86_64-1.6.2
VM arguments: [-Dicedtea-web.bin.name=javaws.itweb, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
Dataset consistency test: No problems found

Plugins:
+ HouseNumberTaggingTool (33904)
+ Mapillary (v1.5.10)
+ OpeningHoursEditor (33876)
+ RoadSigns (33798)
+ apache-commons (33668)
+ apache-http (32699)
+ cadastre-fr (33965)
+ conflation (0.5.6)
+ continuosDownload (68)
+ ejml (32680)
+ geotools (33958)
+ imagery_offset_db (33774)
+ jogl (1.1.0)
+ jts (32699)
+ log4j (32699)
+ opendata (34019)
+ photo_geotagging (33967)
+ photoadjust (33746)
+ pt_assistant (33860)
+ reverter (34036)
+ tag2link (33934)
+ todo (30303)
+ turnrestrictions (33780)
+ utilsplugin2 (33991)
+ wikipedia (33993)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Light_sources&zip=1
+ http://zibi.openstreetmap.org.pl/kendzi/k/Simple3dPreset/s3db-preset.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Addr2&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/BuildingPreset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://raw.github<user.name>content.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.xml
+ http://osmtools.de/josm/steps.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/BesideTheRoad_Speed&zip=1
- https://raw.github<user.name>content.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1
- https://raw.github<user.name>content.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/light_source&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
- https://raw.github<user.name>content.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Noname&zip=1

Validator rules:
+ https://raw.github<user.name>content.com/nlehuby/transport_mapcss/master/transport.validator.mapcss
+ http://www.openrailwaymap.org/validator/openrailwaymap.validator.mapcss
+ https://raw.github<user.name>content.com/stefan-a-bauer/josm-validators/master/mtb.validator.mapcss

Last errors/warnings:
- E: Illegal character in path at index 117: http://almashriq.hiof.no/lebanon/300/380/385/railways/branches/beirut-riyaq/20020217-soufar/html/20020217-111442.html"><img src="http://almashriq.hiof.no/lebanon/300/380/385/railways/branches/beirut-riyaq/20020217-soufar/icns/20020217-111442.jpg
- E: Illegal character in path at index 117: http://almashriq.hiof.no/lebanon/300/380/385/railways/branches/beirut-riyaq/20020217-soufar/html/20020217-111442.html"><img src="http://almashriq.hiof.no/lebanon/300/380/385/railways/branches/beirut-riyaq/20020217-soufar/icns/20020217-111442.jpg
- E: Handled by bug report queue: java.lang.IllegalArgumentException: Invalid characters in hostname


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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-1 (36) of JOSM
java.lang.IllegalArgumentException: Invalid characters in hostname
	at java.net.HostPortrange.toLowerCase(HostPortrange.java:189)
	at java.net.HostPortrange.<init>(HostPortrange.java:150)
	at java.net.URLPermission$Authority.<init>(URLPermission.java:486)
	at java.net.URLPermission.parseURI(URLPermission.java:454)
	at java.net.URLPermission.init(URLPermission.java:170)
	at java.net.URLPermission.<init>(URLPermission.java:166)
	at java.net.URLPermission.<init>(URLPermission.java:207)
	at sun.net.util.URLUtil.getURLConnectPermission(URLUtil.java:101)
	at sun.net.util.URLUtil.getConnectPermission(URLUtil.java:86)
	at sun.awt.SunToolkit.checkPermissions(SunToolkit.java:933)
	at sun.awt.SunToolkit.createImage(SunToolkit.java:798)
	at javax.swing.text.html.ImageView.loadImage(ImageView.java:700)
	at javax.swing.text.html.ImageView.refreshImage(ImageView.java:673)
	at javax.swing.text.html.ImageView.sync(ImageView.java:645)
	at javax.swing.text.html.ImageView.getPreferredSpan(ImageView.java:443)
	at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:732)
	at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:233)
	at javax.swing.text.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:717)
	at javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:157)
	at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
	at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
	at javax.swing.text.html.ParagraphView.getMinimumSpan(ParagraphView.java:270)
	at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
	at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
	at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
	at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
	at javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:378)
	at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
	at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
	at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
	at javax.swing.text.BoxView.getPreferredSpan(BoxView.java:545)
	at javax.swing.text.html.BlockView.getPreferredSpan(BlockView.java:362)
	at javax.swing.plaf.basic.BasicHTML$Renderer.<init>(BasicHTML.java:383)
	at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:67)
	at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:207)
	at javax.swing.plaf.basic.BasicToolTipUI$PropertyChangeHandler.propertyChange(BasicToolTipUI.java:242)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at java.awt.Component.firePropertyChange(Component.java:8428)
	at javax.swing.JToolTip.setTipText(JToolTip.java:131)
	at javax.swing.ToolTipManager.showTipWindow(ToolTipManager.java:287)
	at javax.swing.ToolTipManager$insideTimerAction.actionPerformed(ToolTipManager.java:669)
	at javax.swing.Timer.fireActionPerformed(Timer.java:313)
	at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (1)

15887.osm (1003 bytes ) - added by Don-vip 7 years ago.

Download all attachments as: .zip

Change History (4)

by Don-vip, 7 years ago

Attachment: 15887.osm added

comment:1 by Don-vip, 7 years ago

Keywords: linux html added
Milestone: 18.02
Summary: crash on invalid urlcrash on invalid url in selection tooltip

comment:2 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13391/josm:

fix #15887 - escape HTML reserved characters in OSM primitive tooltips

comment:3 by Don-vip, 7 years ago

In 13413/josm:

see #15887 - add unit test

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.