-
Bug
-
Resolution: Fixed
-
P4
-
12
-
b17
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8266379 | 11.0.13-oracle | Sean Coffey | P4 | Resolved | Fixed | b01 |
JDK-8269370 | 11.0.13 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
The following statement will throw an URISyntaxException whose message
contains a '%'. JShell fails to display the exception and exits instead.
jshell> URI u = new URI("http", null, "h", -1, "a" + (char)0x04, null, null);
Exception in thread "main" java.util.IllegalFormatFlagsException: Flags = '0'
at java.base/java.util.Formatter$FormatSpecifier.checkText(Formatter.java:3191)
at java.base/java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2878)
at java.base/java.util.Formatter.parse(Formatter.java:2713)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.io.PrintStream.format(PrintStream.java:1053)
at java.base/java.io.PrintStream.printf(PrintStream.java:949)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.error(JShellTool.java:728)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.errormsg(JShellTool.java:867)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayEvalException(JShellTool.java:3451)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayException(JShellTool.java:3425)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayException(JShellTool.java:3418)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.handleEvent(JShellTool.java:3582)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSource(JShellTool.java:3550)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSourceCatchingReset(JShellTool.java:1301)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processInput(JShellTool.java:1203)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1176)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:975)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
contains a '%'. JShell fails to display the exception and exits instead.
jshell> URI u = new URI("http", null, "h", -1, "a" + (char)0x04, null, null);
Exception in thread "main" java.util.IllegalFormatFlagsException: Flags = '0'
at java.base/java.util.Formatter$FormatSpecifier.checkText(Formatter.java:3191)
at java.base/java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2878)
at java.base/java.util.Formatter.parse(Formatter.java:2713)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.io.PrintStream.format(PrintStream.java:1053)
at java.base/java.io.PrintStream.printf(PrintStream.java:949)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.error(JShellTool.java:728)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.errormsg(JShellTool.java:867)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayEvalException(JShellTool.java:3451)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayException(JShellTool.java:3425)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.displayException(JShellTool.java:3418)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.handleEvent(JShellTool.java:3582)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSource(JShellTool.java:3550)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSourceCatchingReset(JShellTool.java:1301)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processInput(JShellTool.java:1203)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1176)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:975)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
- backported by
-
JDK-8266379 JShell fails and exits when statement throws an exception whose message contains a '%'.
-
- Resolved
-
-
JDK-8269370 JShell fails and exits when statement throws an exception whose message contains a '%'.
-
- Resolved
-
- duplicates
-
JDK-8213274 JShell crashes because it interprets a String as a "format"
-
- Closed
-
-
JDK-8214852 JShell tool vulnerable to printf format injection
-
- Closed
-
(1 links to)