Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3] Fix cookie with Max-Age processing #610

Closed
wants to merge 2 commits into from

Conversation

stlaz
Copy link
Contributor

@stlaz stlaz commented Mar 16, 2017

When cookie has Max-Age set it tries to get expiration by adding
to a timestamp. Without this patch the timestamp would be set to
None and thus the addition of timestamp + max_age fails

https://pagure.io/freeipa/issue/6718

ipalib/rpc.py Outdated
session_cookie = Cookie.get_named_cookie_from_string(
cookie_string, COOKIE_NAME,
timestamp=datetime.datetime.utcnow())
except Exception:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug log here might be useful, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, why not. I was just porting the code not really looking that way or another.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, create another commit that can be applied to master and 4.5 branch as well

@MartinBasti
Copy link
Contributor

Please open a new ticket Backport .... Ticket you used is closed in closed milestone

When cookie has Max-Age set it tries to get expiration by adding
to a timestamp. Without this patch the timestamp would be set to
None and thus the addition of timestamp + max_age fails

https://pagure.io/freeipa/issue/6774
@stlaz
Copy link
Contributor Author

stlaz commented Mar 17, 2017

The ticket's already there, I just recycled the old commit message and forgot to replace it.

@MartinBasti MartinBasti self-assigned this Mar 20, 2017
@MartinBasti MartinBasti added the ack Pull Request approved, can be merged label Mar 20, 2017
@tkrizek
Copy link
Contributor

tkrizek commented Mar 20, 2017

ipa-4-3:

  • 0d66046 Fix cookie with Max-Age processing
  • 71475e3 Add debug log in case cookie retrieval went wrong

@tkrizek tkrizek added the pushed Pull Request has already been pushed label Mar 20, 2017
@tkrizek tkrizek closed this Mar 20, 2017
@stlaz stlaz deleted the 4_3_cookie_fix branch September 11, 2017 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants