Skip to content

Commit

Permalink
Adjusting the setting of SameSite property for CookieTest: it will (#57)
Browse files Browse the repository at this point in the history
get SameSite=None regardless of samesite setting, unless samesite
property is disabled.

Addresses #20 and likely #47
  • Loading branch information
rgriffogoes authored Mar 19, 2021
1 parent ea0f9d1 commit 5a629a1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions auth_mellon_cookie.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,13 @@ static const char *am_cookie_params(request_rec *r)
}

if (env_var_value == NULL){
if ((cfg->cookie_samesite != am_samesite_default) &&
(apr_table_get(r->notes, AM_FORCE_SAMESITE_NONE_NOTE) != NULL)) {
if (cfg->cookie_samesite == am_samesite_none ||
apr_table_get(r->notes, AM_FORCE_SAMESITE_NONE_NOTE) != NULL){
cookie_samesite = "; SameSite=None";
}
else if (cfg->cookie_samesite == am_samesite_lax) {
} else if (cfg->cookie_samesite == am_samesite_lax) {
cookie_samesite = "; SameSite=Lax";
} else if (cfg->cookie_samesite == am_samesite_strict) {
cookie_samesite = "; SameSite=Strict";
} else if (cfg->cookie_samesite == am_samesite_none) {
cookie_samesite = "; SameSite=None";
}
}

Expand Down

0 comments on commit 5a629a1

Please sign in to comment.