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

fix(viewer): hash all parameters before sending get showimage request #872

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

icaparros-at-wiris
Copy link
Contributor

Description

Formulas are cached including parameters: centerbaseline, metrics, and lang. However, the new Viewer is not hashing these parameters before initiating the showImage Get request. Consequently, the generated Hash does not align with the Hash saved in the cache by Integration Services. This inconsistency leads to the cache being ignored by the viewer.

Steps to reproduce

  1. Add next mathml on the body of html-integrations/packages/viewer/infex.html:
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi><mo>=</mo><mfrac><mrow><mo>-</mo><mi>b</mi><mo>&#177;</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>-</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></math>
  1. Build the viewer using command nx build viewer
  2. Open index.html nx serve viewer
  3. On the Inspector > Network Tab just will appear a showImage request with the hash e16131cb25b408479febbfa0183a4478

image


#taskid 42679

@icaparros-at-wiris icaparros-at-wiris self-assigned this Jan 18, 2024
@carla-at-wiris carla-at-wiris merged commit 05d01b7 into stable Jan 24, 2024
19 of 20 checks passed
@carla-at-wiris carla-at-wiris deleted the KB-42679 branch January 24, 2024 15:43
@carla-at-wiris carla-at-wiris restored the KB-42679 branch January 24, 2024 15:44
@carla-at-wiris carla-at-wiris deleted the KB-42679 branch January 24, 2024 15:52
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

Successfully merging this pull request may close these issues.

2 participants