Bug #8523

Unauthorized users can perform DoS attacks

Added by Evgeny Novikov about 2 months ago. Updated 5 days ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Detected in build:
Published in build:


The issue was discovered by Alexey Khoroshilov. The corresponding error description is the following:

AttributeError at /reports/coverage-light/1829813/

'AnonymousUser' object has no attribute 'extended'

Request Method:     GET
Request URL:     http://ldvstore:8998/reports/coverage-light/1829813/
Django Version:     1.11.3
Exception Type:     AttributeError
Exception Value:    

'AnonymousUser' object has no attribute 'extended'

Exception Location:     /usr/local/lib/python3.4/dist-packages/django/utils/ in inner, line 239
Python Executable:     /usr/bin/python3
Python Version:     3.4.2
Python Path:    


Server time:     Пн, 23 Окт 2017 16:41:24 +0000

Related issues

Related to Klever - Feature #7174: Develop security tests for BridgeNew2016-05-05


#1 Updated by Vladimir Gratinskiy about 2 months ago

  • Due date set to 10/24/2017
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Fixed in fix_8523.

#2 Updated by Evgeny Novikov about 2 months ago

  • Status changed from Resolved to Closed

I merged the branch to master in commit:68ca934. In addition, I backported the fix to branch v0.2-stable since this bug can lie down production servers.

Indeed it would be great to have corresponding test cases that will try to access all possible entry points without being authorized.

#3 Updated by Evgeny Novikov 6 days ago

  • Status changed from Closed to Open

I found out another reason located almost in the same place:

[05.Dec.2017 16:18:01] Internal Server Error: /reports/ajax/get-coverage-src/
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/", line 41, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/www/klever-bridge/tools/", line 133, in wait
    res = f(*args, **kwargs)
  File "/var/www/klever-bridge/reports/", line 873, in get_coverage_src
  File "/usr/local/lib/python3.5/dist-packages/django/utils/", line 239, in inner
    return func(self._wrapped, *args)
AttributeError: 'AnonymousUser' object has no attribute 'extended'

#4 Updated by Vladimir Gratinskiy 5 days ago

  • Status changed from Open to Resolved

Fixed in fix_8523.

#5 Updated by Evgeny Novikov 5 days ago

  • Status changed from Resolved to Closed

I merged the branch to master in commit:fd8420e. In addition, I backported the commit to branch v0.2-stable by the same reason as for the previous bug fix.

BTW, I hope that one day we will have appropriate tests. For instance, I couldn't test the last bug fix. Moreover, it was revealed unexpectedly, since this is a post request that one can't easily generate and by unknown reasons my authorization was dropped between viewing code coverage and trying to view code coverage for another file.

Also available in: Atom PDF