Bug 1322606 - [abrt] fedora-easy-karma: bodhi.py:96:wrapper:BodhiClientException: CSRF tokens do not match. This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere ...
Summary: [abrt] fedora-easy-karma: bodhi.py:96:wrapper:BodhiClientException: CSRF toke...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-easy-karma
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Till Maas
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:af021f573dbfa5039d43f4adb9c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-30 21:13 UTC by kakoskin
Modified: 2016-07-19 18:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:47:27 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (1.85 KB, text/plain)
2016-03-30 21:13 UTC, kakoskin
no flags Details
File: environ (3.39 KB, text/plain)
2016-03-30 21:13 UTC, kakoskin
no flags Details

Description kakoskin 2016-03-30 21:13:50 UTC
Description of problem:
Run Fedora easy karma. Leave it open for couple of hours waiting karma for an update. Supply karma and a comment. Fedora-easy-karma will crash when it tries to submit your karma with backtrace printed to console.

This crash appears to not to be repeatable reliably. 

Expected results: An error message instead of a crash. 




Version-Release number of selected component:
fedora-easy-karma-0-0.26.20150921gitc932687a.fc22

Additional info:
reporter:       libreport-2.6.4
cmdline:        /usr/bin/python /usr/bin/fedora-easy-karma
dso_list:       python-fedora-0.7.1-4.fc22.noarch
executable:     /usr/bin/fedora-easy-karma
kernel:         4.4.6-200.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
bodhi.py:96:wrapper:BodhiClientException: CSRF tokens do not match.  This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere before reloading. 

Traceback (most recent call last):
  File "/usr/bin/fedora-easy-karma", line 831, in <module>
    fek = FedoraEasyKarma()
  File "/usr/bin/fedora-easy-karma", line 690, in __init__
    karma)
  File "/usr/bin/fedora-easy-karma", line 815, in send_comment
    res = bc.comment(update["title"], comment, karma=karma)
  File "/usr/lib/python2.7/site-packages/fedora/client/bodhi.py", line 96, in wrapper
    raise BodhiClientException(problems)
BodhiClientException: CSRF tokens do not match.  This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere before reloading. 

Local variables in innermost frame:
e: Munch(description=u'CSRF tokens do not match.  This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere before reloading. ', location=u'body', name=u'csrf_token')
args: (<fedora.client.bodhi.Bodhi2Client object at 0x7f41454d00d0>, u'wine-1.9.6-1.fc22', 'No regressions noted.')
problems: u'CSRF tokens do not match.  This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere before reloading. '
result: Munch(errors=[Munch(description=u'CSRF tokens do not match.  This happens if you have the page open for a long time. Please reload the page and try to submit your data again. Make sure to save your input somewhere before reloading. ', location=u'body', name=u'csrf_token')], status=u'error')
kwargs: {'karma': '1'}
method: <function comment at 0x7f414e6cc578>

Comment 1 kakoskin 2016-03-30 21:13:54 UTC
Created attachment 1141938 [details]
File: backtrace

Comment 2 kakoskin 2016-03-30 21:13:55 UTC
Created attachment 1141939 [details]
File: environ

Comment 3 Till Maas 2016-04-08 15:06:16 UTC
The session handling is done in python-fedora, reassigning.

Comment 4 Patrick Uiterwijk 2016-04-29 22:27:05 UTC
The only case in which I have been able to reproduce this bug is if the client does two calls to Bodhi at the same time.
The library is NOT multi-thread safe.

The CSRF token is refreshed at the moment a request is sent.

So in this case, I think that easy-karma might be issuing multiple requests at the same time.

Comment 5 Fedora End Of Life 2016-07-19 18:47:27 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.