From: Olyutorskii Date: Wed, 25 Mar 2020 13:48:17 +0000 (+0900) Subject: sanitize player URL. X-Git-Tag: release-1.504.4^2~1 X-Git-Url: http://git.osdn.net/view?p=jindolf%2FJinArchiver.git;a=commitdiff_plain;h=e4308fd8668c9d957a0056299cc1f4c23a680716 sanitize player URL. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dd39510..39ba91d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,9 @@ JinArchiver 変更履歴 +X.XXX.X (2020-XX-XX) + ・プレイヤーURL前後の不正キャラクタをサニタイズ。 + 1.504.2 (2020-02-11) ・G国亡国に伴い JinParser 2.102.2 に対応。 ・起動クラスのFQNをjp.osdn.jindolf.ar.JinArchiverに短縮。 diff --git a/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java b/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java index a63864d..7f4da04 100644 --- a/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java +++ b/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java @@ -433,8 +433,8 @@ public class EventData extends TopicData{ writer.attrOut("role", roleName); String uriStr = uri.toString(); - uriStr = uriStr.replaceAll("^[\\s]+", ""); - uriStr = uriStr.replaceAll("[\\s]+$", ""); + uriStr = uriStr.replaceAll("^[\\s\\p{Cntrl}]+", ""); + uriStr = uriStr.replaceAll("[\\s\\p{Cntrl}]+$", ""); uriStr = uriStr.replaceAll("[\\s]+", "\u0020"); if(uriStr.length() > 0){ writer.sp();