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

Request body malformed #23

Open
dsx76 opened this issue Mar 8, 2019 · 0 comments
Open

Request body malformed #23

dsx76 opened this issue Mar 8, 2019 · 0 comments
Labels

Comments

@dsx76
Copy link

dsx76 commented Mar 8, 2019

Hello,

We found an issue with some request body (payload) while using AuditShare. The payload catched by AuditShare contains gibberish characters when it's send to alfresco server.

As an example, when updating a folder's metadata (action audited with AuditShare) which contains cyrillic characters, the description was modified as such for the Test folder :
descriptionrusse

In this case, the form update's request body use correct encoding from Browser to Share server where as from Share to Alfresco back the request body is malformed and contains ???????????.

As we use US-ASCII encoding on alfresco server while the request body is UTF-8 encoded, this issue seems to be coming from an altered request body with wrong encoding.
US-ASCII does not support the word приметы so it's converted to ???????????.

This issue seems to come from the RequestWrapper class which use JVM encoding setting (Default Charset) of alfresco hosting server instead of using request body encoding at these lines :

StringWriter writer = new StringWriter();
IOUtils.copy(inputStream, writer);
return writer.toString();
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(stringRequest.getBytes());

Affected versions :

  • Alfresco Enterprise 5.2.3
  • AuditShare 1.5.8

Regards.

@bforest bforest added the bug label Apr 3, 2019
@bforest bforest self-assigned this Apr 3, 2019
@bforest bforest removed their assignment Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants