internetarchive / internetarchive/openlibrary

Upgrade BookReaderAuth.php and borrow.py make_ia_token to use stronger hash

Open
#10,096 2 comments 0 reactions 1 assignee Claimed by @jimchamp View on GitHub
Lead: @cdrini Needs: Breakdown Priority: 3 State: Blocked Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

### Problem

In https://github.com/internetarchive/openlibrary/blob/0dfc2fafc096823dc1ed6268e30bdbca65ce3240/openlibrary/plugins/upstream/borrow.py#L773-L785 we make a call to BookReaderAuth.php and pass in an iaAuthToken. We may want to extend BookReaderAuth.php to also support iaStrongAuthToken which is a new field we can use to move from md5 to a stronger hash while not breaking any other code path that is using / relying on iaAuthToken.

### Reproducing the bug

1. Go to ...
2. Do ...

* Expected behavior:
* Actual behavior:

### Context

- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N):
- Environment (prod, dev, local): prod

### Breakdown

#### Requirements Checklist
* [ ]

#### Related files

*

#### Stakeholders

* cc: @cdrini


#### Instructions for Contributors

- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.