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

Miscellaneous fixes for things flagged by automated code scan #12784

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

rtibbles
Copy link
Member

@rtibbles rtibbles commented Nov 4, 2024

Summary

  • Gets rid of custom function for JS query parameter parsing in favour of built in web API
  • Use endswith checking for more robust filename extension checks now that we can use it in every browser we support
  • Limits which file paths the freespace view can access based on the query parameter
  • Set isEvalSupported to false for PDFJS usage to prevent arbitrary JS execution from a PDF
  • Don't persist the auth_token sent to the initialize endpoint if it hasn't returned a valid user

Reviewer guidance

The net result here should be minimal.

Should test redirect after login using the next parameter.
Make sure that H5P apps run properly.
Ensure that free space checking during file import is working as intended.
Make sure PDFs still render properly.
Check that autologin is functioning as intended in the Android app.


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@github-actions github-actions bot added DEV: renderers HTML5 apps, videos, exercises, etc. DEV: backend Python, databases, networking, filesystem... APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: frontend labels Nov 4, 2024
@pcenov
Copy link
Member

pcenov commented Nov 6, 2024

Hi @rtibbles, in terms of manual QA I confirm that the following points are working correctly:

  • Make sure that H5P apps run properly.
  • Ensure that free space checking during file import is working as intended.
  • Make sure PDFs still render properly.
  • Check that autologin is functioning as intended in the Android app.

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after chatting through some of the changes with @rtibbles, and this passing manual QA, I think this is good to go

@marcellamaki marcellamaki merged commit 04f4a38 into learningequality:develop Nov 7, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: backend Python, databases, networking, filesystem... DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants