Skip to content

Commit

Permalink
SEBSERV-624 try fix by URL encoding body
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Jan 16, 2025
1 parent fecacbe commit a1b5019
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle;

import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -362,7 +364,7 @@ public String postToMoodleAPIFunction(
queryParam.queryParams(queryParams);
}

final String body = createMoodleFormPostBody(queryAttributes);
final String body = URLEncoder.encode(createMoodleFormPostBody(queryAttributes), StandardCharsets.UTF_8);

if (log.isDebugEnabled()) {
try {
Expand Down

0 comments on commit a1b5019

Please sign in to comment.