Skip to content

Commit

Permalink
Fix encoding for query, request and header
Browse files Browse the repository at this point in the history
  • Loading branch information
ron190 committed Jul 5, 2023
1 parent 4b52ce7 commit 9df76ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/src/main/java/com/jsql/model/InjectionModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ private String applyRfcEncoding(AbstractMethodInjection methodInjection, String

if (!this.mediatorUtils.getParameterUtil().isRequestSoap()) {

if (methodInjection != this.mediatorMethod.getHeader() && methodInjection != this.mediatorMethod.getRequest()) {
if (methodInjection == this.mediatorMethod.getQuery()) {

// URL encode each character because no query parameter context
if (!this.mediatorUtils.getPreferencesUtil().isUrlEncodingDisabled()) {
Expand All @@ -738,7 +738,7 @@ private String applyRfcEncoding(AbstractMethodInjection methodInjection, String
queryFixed = queryFixed.replace("|", "%7c");
queryFixed = queryFixed.replace("\\", "%5c");

} else {
} else if (methodInjection != this.mediatorMethod.getRequest()) {

// For cookies in Spring (confirmed, covered by integration tests)
// Replace spaces
Expand Down

0 comments on commit 9df76ea

Please sign in to comment.