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

[BUG] Unable to correctly determine the image format type of the base64 encoded jpeg2000 image #44

Open
typelogic opened this issue Nov 23, 2020 · 0 comments

Comments

@typelogic
Copy link

This bug is detected in branch 1.1.2. I also scan the code, it is also in branch 1.1.3.

Mismatch image type header from actual image type content

To Reproduce
It can only be reproduced when integrating a third-party component. I believe the offending line is in the following:

  • For branch 1.1.3 it is in line 572 of PrintServiceImpl.java.
  • For branch 1.1.2 it is line 551 of PrintServiceImpl.java.

The image type is hardcoded as data:image/png;base64. The problem only manifests when integrating a third-party component which tries to convert the base64 encoded image content to other format. If the image content is of type jpeg2000 format, then the header should describe it as such.

Expected behavior
The header should describe the image type in order for third-party component to properly handle the image content

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Server OS: [RHEL 7, CentOS 7]
  • Client OS : [Windows 10, Ubuntu 18.04 LTS etc]
  • Build : [build that is being used]
  • Browser : [Chrome, Firefox, Edge]

Attach logs
The code line# is already provided with regards to root cause.

Additional context
The image type is needed in this particular line of the third-party component: https://github.com/newlogic/mosip-print/blob/idpass-integration4/src/main/java/org/idpass/lite/IDPassReaderComponent.java#L71

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