Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LEGALNOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and subject to their respective licenses.
| commons-httpclient-3.1.jar | Apache 2.0 |
| commons-io-2.18.0.jar | Apache 2.0 |
| commons-lang-2.6.jar | Apache 2.0 |
| commons-lang3-3.17.0.jar | Apache 2.0 |
| commons-lang3-3.18.0.jar | Apache 2.0 |
| commons-logging-1.3.5.jar | Apache 2.0 |
| commons-text-1.13.0.jar | Apache 2.0 |
| ezmorph-1.0.6.jar | Apache 2.0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.Constant;
Expand Down Expand Up @@ -486,7 +486,7 @@ public void saveSnapshot() {
if (session.getFileName() != null && session.getFileName().trim().length() > 0) {
String proposedFileName;
// if there is already a file name, use it and add a timestamp
proposedFileName = StringUtils.removeEnd(session.getFileName(), ".session");
proposedFileName = Strings.CI.removeEnd(session.getFileName(), ".session");
proposedFileName += "-" + dateFormat.format(new Date()) + ".session";
fileproposal = new File(proposedFileName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
import java.util.Vector;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.model.HistoryReference;
Expand Down Expand Up @@ -875,7 +875,7 @@ public TreeSet<HtmlParameter> getUrlParams() {
public TreeSet<HtmlParameter> getFormParams() {
final String contentType = mReqHeader.getHeader(HttpRequestHeader.CONTENT_TYPE);
if (contentType == null
|| !StringUtils.startsWithIgnoreCase(
|| !Strings.CI.startsWith(
contentType.trim(), HttpHeader.FORM_URLENCODED_CONTENT_TYPE)) {
return new TreeSet<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.HTMLElementName;
import net.htmlparser.jericho.Source;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -433,8 +433,7 @@ public boolean isAntiCsrfToken(String name) {
return false;
}
for (String tokenName : this.getAntiCsrfTokenNames()) {
if (this.getParam().isPartialMatchingEnabled()
&& StringUtils.containsIgnoreCase(name, tokenName)
if (this.getParam().isPartialMatchingEnabled() && Strings.CI.contains(name, tokenName)
|| tokenName.equalsIgnoreCase(name)) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions zap/src/main/java/org/zaproxy/zap/extension/api/CoreAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import net.sf.json.JSONObject;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -1323,7 +1323,7 @@ public void process(RecordHistory recordHistory) {
for (Logger logger : LoggerContext.getContext().getLoggers()) {
if (logName.isEmpty()
|| (!logName.isEmpty()
&& StringUtils.startsWithIgnoreCase(logger.getName(), logName))) {
&& Strings.CI.startsWith(logger.getName(), logName))) {
loggerDetails.put(logger.getName(), logger.getLevel().name());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import java.io.IOException;
import java.net.UnknownHostException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.Constant;
Expand Down Expand Up @@ -151,7 +151,7 @@ private void optionsChanged() {
statsd = null;
}
} else if (statsdInit) {
if (!StringUtils.equals(this.getStatsParam().getStatsdHost(), statsd.getHost())
if (!Strings.CS.equals(this.getStatsParam().getStatsdHost(), statsd.getHost())
|| this.getStatsParam().getStatsdPort() != statsd.getPort()) {
// Have to re-initialise it
LOGGER.info("Restart sending stats to statsd server");
Expand All @@ -162,7 +162,7 @@ private void optionsChanged() {
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
} else if (!StringUtils.equals(
} else if (!Strings.CS.equals(
this.getStatsParam().getStatsdPrefix(), statsd.getPrefix())) {
statsd.setPrefix(this.getStatsParam().getStatsdPrefix());
}
Expand Down
2 changes: 1 addition & 1 deletion zap/zap.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ dependencies {
api("commons-httpclient:commons-httpclient:3.1")
api("commons-io:commons-io:2.18.0")
api("commons-lang:commons-lang:2.6")
api("org.apache.commons:commons-lang3:3.17.0")
api("org.apache.commons:commons-lang3:3.18.0")
api("org.apache.commons:commons-text:1.13.0")
implementation("edu.umass.cs.benchlab:harlib:1.1.3")
api("javax.help:javahelp:2.0.05")
Expand Down
Loading