Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Conversation

@liffiton
Copy link

@liffiton liffiton commented May 9, 2023

What are the relevant tickets?

#78

What does this PR do?

This pull request drops the unmaintained oauth2 library in favor of oauthlib, which is maintained and appears to be more robust. In the process, this drops support for older versions of Python, now requiring 3.7+.

How should this be manually tested?

pip install -r requirements.txt
pytest

All tests pass. I've manually tested it with Python 3.7, 3.8, 3.9, 3.10, and 3.11.

Where should the reviewer start?

All substantial code changes are in pylti/common.py. Most large removals are removing workarounds for bugs in oauth2 that are now not needed.

I tried to stick as close to oauth2's implementation as possible. This includes not recording nonces to check for reuse, which is a security issue, but no worse than it was before. (And fwiw, while the LTI spec says that tool providers "should keep a record of nonces received," it also talks about an implementation detail "if you do not record nonces" as well.)

The rest is minor test cleanup, dependency updates, etc.

I'd be happy to make further commits for style or correctness.

@gitguardian
Copy link

gitguardian bot commented May 9, 2023

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - Generic Private Key 88ce21c pylti/tests/data/certs/snakeoil.pem View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant