Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solutionSubmit URL can not show Chinese in Respone body #580

Closed
anquanbiji opened this issue Aug 22, 2021 · 1 comment
Closed

solutionSubmit URL can not show Chinese in Respone body #580

anquanbiji opened this issue Aug 22, 2021 · 1 comment

Comments

@anquanbiji
Copy link

anquanbiji commented Aug 22, 2021

Hi
I have set the lange = zh, but in respone body of solutionSubmit URL the Chinese is instead of ??? .

Sometime in respone body of refreshMenu URL the Chinese is instead of ??? .

is it bug?

Thanks!

@anquanbiji
Copy link
Author

there is no encoding of response in src/main/java/servlets/module/RefreshMenu.java and src/main/java/servlets/module/SolutionSubmit.java file.

After adding the code (response.setContentType("text/html;charset=utf-8");) before (PrintWriter out = response.getWriter(); ), it can work well.

Hope this is useful for others.

the detail information:
0. install the Shepherd with vm. https://github.com/OWASP/SecurityShepherd/releases/download/v3.1/owaspSecurityShepherd_v3.1_VM.zip

  1. download the source code https://github.com/OWASP/SecurityShepherd/archive/refs/tags/v3.1.tar.gz
  2. add the code (response.setContentType("text/html;charset=utf-8");) in src/main/java/servlets/module/RefreshMenu.java and src/main/java/servlets/module/SolutionSubmit.java
  3. make package with command "mvn -Pdocker clean install -DskipTests", of course you should install maven with (sudo apt-get install maven )
  4. move the target/owaspSecurityShepherd.war to /var/lib/tomcat8/webapps/ROOT.war
  5. restart the tomcat /etc/init.d/tomcat8 restart
  6. now it can work well

note: the lastest source code can't work in Shepherd_v3.1_VM, so you should change the source code with https://github.com/OWASP/SecurityShepherd/archive/refs/tags/v3.1.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant