From 522ee9c5545a80426d1e494204aee40541da8e01 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 30 Jan 2020 21:06:35 +0000 Subject: [PATCH] [bug-64108] unsafe pipe character ( git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1873384 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java | 2 +- .../org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java index 4d4b917ed4..a80ba95bc5 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java @@ -760,7 +760,7 @@ public final class PackagingURIHelper { }; private static boolean isUnsafe(int ch) { - return ch >= 0x80 || Character.isWhitespace(ch); + return ch >= 0x80 || ch == 0x7C || Character.isWhitespace(ch); } } diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java index 9969187422..3bbce458cb 100644 --- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java +++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java @@ -127,7 +127,8 @@ public class TestPackagingURIHelper { "..\\cygwin\\home\\yegor\\dinom\\%5baccess%5d.2010-10-26.log", "#'Instructions (Text)'!B21", "#'性'!B21", - "javascript://" + "javascript://", + "#ctl||rId16||cmdAddAction||_x0000_i1029" }; for(String s : href){ -- 2.39.5