#3942 closed defect (fixed)

A GBS request without authorization provokes an internal server error

Reported by: exarkun Owned by: GitHub <noreply@…>
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

2022-11-15T09:51:32-0500 [twisted.web.server.Request#critical] 
        Traceback (most recent call last):
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/twisted/web/server.py", line 292, in render
            body = resrc.render(self)
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/klein/_resource.py", line 215, in render
            d = maybeDeferred(_execute)
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/twisted/internet/defer.py", line 206, in maybeDeferred
            result = f(*args, **kwargs)
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/klein/_resource.py", line 205, in _execute
            d = maybeDeferred(
        --- <exception caught here> ---
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/twisted/internet/defer.py", line 206, in maybeDeferred
            result = f(*args, **kwargs)
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/klein/_app.py", line 230, in execute_endpoint
            return endpoint_f(
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/klein/_app.py", line 366, in _f
            return _call(instance, f, request, *a, **kw)
          File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python3.9/site-packages/klein/_app.py", line 124, in _call
            result = __klein_f__(*args, **kwargs)
          File "/home/exarkun/Work/python/tahoe-lafs/src/allmydata/storage/http_server.py", line 103, in route
            request.requestHeaders.getRawHeaders("Authorization", [None])[0].encode(
        builtins.AttributeError: 'NoneType' object has no attribute 'encode'

Change History (2)

comment:2 Changed at 2022-12-22T00:01:32Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 3badd42/trunk:

Merge pull request #1232 from exarkun/3942.missing-authorization-handling

3942 Handle missing Authorization in GBS server

Fixes: ticket:3942

Note: See TracTickets for help on using tickets.