HTTP 500 on malformed OAuth request
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MAAS | Status tracked in 3.6 | |||||
3.4 |
Won't Fix
|
Low
|
Unassigned | |||
3.5 |
Won't Fix
|
Low
|
Unassigned | |||
3.6 |
Triaged
|
Low
|
Unassigned |
Bug Description
maas version: snap/3.
expected result: malformed request is handled properly (http 400, for example)
actual result: HTTP 500 is raised while performing the following query (note the empty "timestamp" field):
GET /MAAS/api/
Authorization: OAuth oauth_consumer_
Host: 172.27.84.1:5240
Connection: close
User-Agent: RapidAPI/4.1.0 (Macintosh; OS X/13.0.1) GCDHTTPRequest
the following exception is being raised in regiond.log:
2023-01-11 11:35:01 maasserver: [error] #######
2023-01-11 11:35:01 maasserver: [error] Traceback (most recent call last):
File "/snap/
response = wrapped_
File "/snap/
return view_atomic(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/snap/
response = super()
File "/snap/
response = func(*args, **kwargs)
File "/snap/
actor, anonymous = self.authentica
File "/snap/
actor, anonymous = super()
File "/snap/
if not authenticator.
File "/snap/
consumer, token, parameters = self.validate_
File "/snap/
return oauth_server.
File "/snap/
self.
File "/snap/
self.
File "/snap/
timestamp = int(timestamp)
ValueError: invalid literal for int() with base 10: ''
Related branches
- MAAS Lander: Needs Fixing
- Jack Lloyd-Walters: Needs Fixing
-
Diff: 77 lines (+32/-3)2 files modifiedsrc/maasserver/api/auth.py (+16/-2)
src/maasserver/api/tests/test_auth.py (+16/-1)
- MAAS Lander: Approve
- Jack Lloyd-Walters: Approve
-
Diff: 44 lines (+17/-9)1 file modifiedpiston3/oauth.py (+17/-9)
Changed in maas: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in maas: | |
status: | Incomplete → New |
importance: | Medium → Undecided |
status: | New → Incomplete |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.x |
Changed in maas: | |
milestone: | 3.4.x → 3.5.x |
Can you additionally supply a set of replicable instructions for this behaviour?
ie: What were the sequence of steps undertook that led to the error message.