Skip to content

Commit

Permalink
HOTFIX: Convert wp_sub to int
Browse files Browse the repository at this point in the history
- The python-mwoauth library cast it to a string and broke a comparison
  • Loading branch information
suecarmol committed Jan 9, 2025
1 parent 822ceaf commit 7f58e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TWLight/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,15 +705,15 @@ def check_sub(self, wp_sub):
Verifies that the supplied Global Wikipedia User ID matches stored editor ID.
Parameters
----------
wp_sub : int
wp_sub : str
Global Wikipedia User ID, used for guiid parameter in globaluserinfo calls.
Returns
-------
None
"""

if self.wp_sub != wp_sub:
if self.wp_sub != int(wp_sub):
raise SuspiciousOperation(
"Was asked to update Editor data, but the "
"WP sub in the identity passed in did not match the wp_sub on "
Expand Down

0 comments on commit 7f58e15

Please sign in to comment.