Skip to content

Commit aabad9a

Browse files
committed
[RELEASE] iText 5 - 5.5.13.4
2 parents 0231a60 + e8a0a1f commit aabad9a

File tree

10 files changed

+43
-66
lines changed

10 files changed

+43
-66
lines changed

itext/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>itextpdf</artifactId>
13-
<version>5.5.13.3</version>
13+
<version>5.5.13.4</version>
1414

1515
<name>iText Core</name>
1616
<description>A Free Java-PDF library</description>
@@ -75,13 +75,13 @@
7575
<dependency>
7676
<groupId>org.bouncycastle</groupId>
7777
<artifactId>bcprov-jdk15to18</artifactId>
78-
<version>1.70</version>
78+
<version>1.78.1</version>
7979
<optional>true</optional>
8080
</dependency>
8181
<dependency>
8282
<groupId>org.bouncycastle</groupId>
83-
<artifactId>bcpkix-jdk15on</artifactId>
84-
<version>1.70</version>
83+
<artifactId>bcpkix-jdk15to18</artifactId>
84+
<version>1.78.1</version>
8585
<optional>true</optional>
8686
</dependency>
8787
<dependency>

itext/src/main/java/com/itextpdf/text/Version.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ public final class Version {
7474
* This String contains the version number of this iText release.
7575
* For debugging purposes, we request you NOT to change this constant.
7676
*/
77-
private final String release = "5.5.13.3";
77+
private final String release = "5.5.13.4";
7878
/**
7979
* This String contains the iText version as shown in the producer line.
8080
* iText is a product developed by iText Group NV.
8181
* iText Group requests that you retain the iText producer line
8282
* in every PDF that is created or manipulated using iText.
8383
*/
84-
private String iTextVersion = iText + " " + release + " \u00a92000-2022 iText Group NV";
84+
private String iTextVersion = iText + " " + release + " \u00a92000-2024 iText Group NV";
8585
/**
8686
* The license key.
8787
*/

itext/src/main/java/com/itextpdf/text/pdf/DefaultSplitCharacter.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,14 @@ public DefaultSplitCharacter(char[] characters) {
116116
* @return <CODE>true</CODE> if the character can be used to split a string, <CODE>false</CODE> otherwise
117117
*/
118118
public boolean isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck) {
119-
char[] ccTmp = checkDatePattern(String.valueOf(cc));
120-
char c = getCurrentCharacter(current, ccTmp, ck);
119+
char c = getCurrentCharacter(current, cc, ck);
120+
if (c == '-') {
121+
int beginDateidx = Math.max(current - 8, 0);
122+
int dateLength = Math.min(16, cc.length - beginDateidx);
123+
if (containsDate(String.valueOf(cc, beginDateidx, dateLength))) {
124+
return false;
125+
}
126+
}
121127

122128
if (characters != null) {
123129
for (int i = 0; i < characters.length; i++) {
@@ -155,14 +161,8 @@ protected char getCurrentCharacter(int current, char[] cc, PdfChunk[] ck) {
155161
return (char) ck[Math.min(current, ck.length - 1)].getUnicodeEquivalent(cc[current]);
156162
}
157163

158-
private char[] checkDatePattern(String data) {
159-
if (data.contains("-")) {
160-
Matcher m = DATE_PATTERN.matcher(data);
161-
if (m.find()) {
162-
String tmpData = m.group(1).replace('-', '\u2011');
163-
data = data.replaceAll(m.group(1), tmpData);
164-
}
165-
}
166-
return data.toCharArray();
164+
private static boolean containsDate(String data) {
165+
Matcher m = DATE_PATTERN.matcher(data);
166+
return m.find();
167167
}
168168
}

itext/src/main/java/com/itextpdf/text/pdf/security/CertificateUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static String getCRLURL(X509Certificate certificate) throws CertificatePa
120120
if (name.getTagNo() != GeneralName.uniformResourceIdentifier) {
121121
continue;
122122
}
123-
DERIA5String derStr = DERIA5String.getInstance((ASN1TaggedObject)name.toASN1Primitive(), false);
123+
DERIA5String derStr = (DERIA5String) DERIA5String.getInstance((ASN1TaggedObject)name.toASN1Primitive(), false);
124124
return derStr.getString();
125125
}
126126
}

itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype, String provider) {
220220
ASN1ObjectIdentifier objId = (ASN1ObjectIdentifier)signedData.getObjectAt(0);
221221
if (!objId.getId().equals(SecurityIDs.ID_PKCS7_SIGNED_DATA))
222222
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("not.a.valid.pkcs.7.object.not.signed.data"));
223-
ASN1Sequence content = (ASN1Sequence)((ASN1TaggedObject)signedData.getObjectAt(1)).getObject();
223+
ASN1Sequence content = (ASN1Sequence)((ASN1TaggedObject)signedData.getObjectAt(1)).getBaseObject();
224224
// the positions that we care are:
225225
// 0 - version
226226
// 1 - digestAlgorithms
@@ -243,7 +243,7 @@ public PdfPKCS7(byte[] contentsKey, PdfName filterSubtype, String provider) {
243243
// the possible ID_PKCS7_DATA
244244
ASN1Sequence rsaData = (ASN1Sequence)content.getObjectAt(2);
245245
if (rsaData.size() > 1) {
246-
ASN1OctetString rsaDataContent = (ASN1OctetString)((ASN1TaggedObject)rsaData.getObjectAt(1)).getObject();
246+
ASN1OctetString rsaDataContent = (ASN1OctetString)((ASN1TaggedObject)rsaData.getObjectAt(1)).getBaseObject();
247247
RSAdata = rsaDataContent.getOctets();
248248
}
249249

@@ -343,11 +343,11 @@ else if (idSeq2.equals(SecurityIDs.ID_ADBE_REVOCATION)) {
343343
for (int j = 0; j < seqout.size(); ++j) {
344344
ASN1TaggedObject tg = (ASN1TaggedObject)seqout.getObjectAt(j);
345345
if (tg.getTagNo() == 0) {
346-
ASN1Sequence seqin = (ASN1Sequence)tg.getObject();
346+
ASN1Sequence seqin = (ASN1Sequence)tg.getBaseObject();
347347
findCRL(seqin);
348348
}
349349
if (tg.getTagNo() == 1) {
350-
ASN1Sequence seqin = (ASN1Sequence)tg.getObject();
350+
ASN1Sequence seqin = (ASN1Sequence)tg.getBaseObject();
351351
findOcsp(seqin);
352352
}
353353
}
@@ -1283,8 +1283,8 @@ private void findOcsp(ASN1Sequence seq) throws IOException {
12831283
}
12841284
if (seq.getObjectAt(k) instanceof ASN1TaggedObject) {
12851285
ASN1TaggedObject tag = (ASN1TaggedObject)seq.getObjectAt(k);
1286-
if (tag.getObject() instanceof ASN1Sequence) {
1287-
seq = (ASN1Sequence)tag.getObject();
1286+
if (tag.getBaseObject() instanceof ASN1Sequence) {
1287+
seq = (ASN1Sequence)tag.getBaseObject();
12881288
ret = false;
12891289
break;
12901290
}

itext/src/test/java/com/itextpdf/text/pdf/DefaultSplitCharacterProfilingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class DefaultSplitCharacterProfilingTest {
2121

2222
private static final String READ_FILE_FAIL_MESSAGE = "Failed to read test file {0}. The test could not be completed.";
2323

24-
private static final int TIME_LIMIT = 20000;
24+
private static final int TIME_LIMIT = 5000;
2525

2626
@Test(timeout = 30000)
2727
public void checkDatePatternProfilingTest() {

pdfa/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>itext-pdfa</artifactId>
13-
<version>5.5.13.3</version>
13+
<version>5.5.13.4</version>
1414

1515
<name>iText PDF/A</name>
1616
<description>iText ISO-19005 Module</description>
@@ -80,7 +80,7 @@
8080
<dependency>
8181
<groupId>org.bouncycastle</groupId>
8282
<artifactId>bcprov-jdk15to18</artifactId>
83-
<version>1.70</version>
83+
<version>1.78.1</version>
8484
<optional>true</optional>
8585
</dependency>
8686
<dependency>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</parent>
1010

1111
<artifactId>root</artifactId>
12-
<version>5.5.13.3</version>
12+
<version>5.5.13.4</version>
1313
<packaging>pom</packaging>
1414

1515
<name>iText</name>

xmlworker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>com.itextpdf.tool</groupId>
1313
<artifactId>xmlworker</artifactId>
14-
<version>5.5.13.3</version>
14+
<version>5.5.13.4</version>
1515

1616
<name>iText XML Worker</name>
1717
<description>Parses XML to PDF, with CSS support, using iText</description>

xtra/pom.xml

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>itext-xtra</artifactId>
13-
<version>5.5.13.3</version>
13+
<version>5.5.13.4</version>
1414

1515
<name>iText Xtra</name>
1616
<description>iText Xtra, part of iText a Free Java-PDF library</description>
@@ -63,6 +63,9 @@
6363
</ciManagement>
6464

6565
<properties>
66+
<!-- itext-xtra depends on java 1.8 because
67+
earliest published stable version of common-imaging requires java8 -->
68+
<xtra.java.version>1.8</xtra.java.version>
6669
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6770
<argLine>-Xmx128m</argLine>
6871
<sonar.language>java</sonar.language>
@@ -80,7 +83,7 @@
8083
<dependency>
8184
<groupId>org.apache.commons</groupId>
8285
<artifactId>commons-imaging</artifactId>
83-
<version>1.0-SNAPSHOT</version>
86+
<version>1.0-alpha1</version>
8487
</dependency>
8588
<dependency>
8689
<groupId>commons-io</groupId>
@@ -111,6 +114,15 @@
111114

112115
<build>
113116
<plugins>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-compiler-plugin</artifactId>
120+
<version>3.10.1</version>
121+
<configuration>
122+
<source>${xtra.java.version}</source>
123+
<target>${xtra.java.version}</target>
124+
</configuration>
125+
</plugin>
114126
<plugin>
115127
<groupId>external.atlassian.jgitflow</groupId>
116128
<artifactId>jgitflow-maven-plugin</artifactId>
@@ -227,41 +239,6 @@
227239
</dependencies>
228240
</profile>
229241
<!-- END: Specific to mapping unit tests and covered code -->
230-
231-
<profile>
232-
<id>compileWithLegacyJDK</id>
233-
<!--
234-
NOTE
235-
Make sure to set the environment variable JAVA7_HOME
236-
to your JDK 1.7 HOME when using this profile.
237-
-->
238-
<properties>
239-
<java.version>1.7</java.version>
240-
<java.home>${env.JAVA7_HOME}</java.home>
241-
<java.libs>${java.home}/jre/lib</java.libs>
242-
<java.bootclasspath>${java.libs}/rt.jar${path.separator}${java.libs}/jce.jar</java.bootclasspath>
243-
</properties>
244-
<build>
245-
<plugins>
246-
<plugin>
247-
<groupId>org.apache.maven.plugins</groupId>
248-
<artifactId>maven-compiler-plugin</artifactId>
249-
<version>3.6.1</version>
250-
<configuration>
251-
<source>${java.version}</source>
252-
<target>${java.version}</target>
253-
<compilerArguments>
254-
<bootclasspath>${java.bootclasspath}</bootclasspath>
255-
</compilerArguments>
256-
<compilerVersion>${java.version}</compilerVersion>
257-
<fork>true</fork>
258-
<executable>${java.home}/bin/javac</executable>
259-
</configuration>
260-
</plugin>
261-
</plugins>
262-
</build>
263-
</profile>
264-
265242
</profiles>
266243

267244
</project>

0 commit comments

Comments
 (0)