summaryrefslogtreecommitdiff
path: root/src/sp_cookie_encryption.c
diff options
context:
space:
mode:
authorjvoisin2022-03-20 18:20:45 +0100
committerjvoisin2022-03-20 18:20:45 +0100
commit81dd7f2ef07af306fe83d7755cbac4529aa9fc8d (patch)
tree32cc44c6231b30db5ac7b15699297863460784aa /src/sp_cookie_encryption.c
parent83b01942dfc80474cc05e09aeef4b44307a7120b (diff)
parentc38df1077a6c1dfbca1baca049214d053e2e7684 (diff)
Merge remote-tracking branch 'sektioneins/master'
Diffstat (limited to 'src/sp_cookie_encryption.c')
-rw-r--r--src/sp_cookie_encryption.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c
index 7bcedd2..b2cff66 100644
--- a/src/sp_cookie_encryption.c
+++ b/src/sp_cookie_encryption.c
@@ -1,7 +1,7 @@
1#include "php_snuffleupagus.h" 1#include "php_snuffleupagus.h"
2 2
3static inline const sp_cookie *sp_lookup_cookie_config(const zend_string *key) { 3static inline const sp_cookie *sp_lookup_cookie_config(const zend_string *key) {
4 const sp_list_node *it = SNUFFLEUPAGUS_G(config).config_cookie->cookies; 4 const sp_list_node *it = SPCFG(cookie).cookies;
5 5
6 while (it) { 6 while (it) {
7 const sp_cookie *config = it->data; 7 const sp_cookie *config = it->data;
@@ -133,11 +133,11 @@ PHP_FUNCTION(sp_setcookie) {
133 } 133 }
134 134
135 /* If the request was issued over HTTPS, the cookie should be "secure" */ 135 /* If the request was issued over HTTPS, the cookie should be "secure" */
136 if (SNUFFLEUPAGUS_G(config).config_auto_cookie_secure) { 136 if (SPCFG(auto_cookie_secure).enable) {
137 const zval server_vars = PG(http_globals)[TRACK_VARS_SERVER]; 137 const zval server_vars = PG(http_globals)[TRACK_VARS_SERVER];
138 if (Z_TYPE(server_vars) == IS_ARRAY) { 138 if (Z_TYPE(server_vars) == IS_ARRAY) {
139 const zval *is_https = 139 const zval *is_https =
140 zend_hash_str_find(Z_ARRVAL(server_vars), "HTTPS", strlen("HTTPS")); 140 zend_hash_str_find(Z_ARRVAL(server_vars), ZEND_STRL("HTTPS"));
141 if (NULL != is_https) { 141 if (NULL != is_https) {
142 secure = 1; 142 secure = 1;
143 } 143 }