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

Enhance Clef state and session cookie flags #254

Merged
merged 3 commits into from Jun 23, 2016
Merged

Enhance Clef state and session cookie flags #254

merged 3 commits into from Jun 23, 2016

Conversation

lolux
Copy link
Contributor

@lolux lolux commented Jun 23, 2016

  1. Add httponly flag to wordpress_clef_session cookie
  2. Conditionally add secure flag to wordpress_clef_session and wordpress_clef_state cookies
  3. In the condition for the secure flag, add support for reverse-proxy-based TLS a la the recommendation in codex.

@@ -306,5 +306,15 @@ public static function get_logout_hook_url() {

return $logout_hook_url;
}

public static function is_tls() {
Copy link
Member

Choose a reason for hiding this comment

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

Can you refactor this to just return the conditional value:

return is_ssl() || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');

@jessepollak
Copy link
Member

LGTM other than my one style comment.

@lolux lolux merged commit 1a3af9f into master Jun 23, 2016
@lolux lolux deleted the cookies branch June 23, 2016 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants