Changeset 3303341
- Timestamp:
- 05/30/2025 06:12:16 AM (10 months ago)
- Location:
- docid/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (1 diff)
-
admin/class-docid-settings.php (modified) (1 diff)
-
docid.php (modified) (1 diff)
-
frontend/class-docid-frontend.php (modified) (3 diffs)
-
includes/class-docid-base.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
docid/trunk/README.txt
r3303322 r3303341 5 5 Requires PHP: 7.4 6 6 Tested up to: 6.8 7 Stable tag: 1. 0.97 Stable tag: 1.1.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
docid/trunk/admin/class-docid-settings.php
r3298300 r3303341 110 110 'default' => '', 111 111 ] 112 ], 113 [ 114 'name' => 'docid_general_cookie_expiration', 115 'title' => esc_html__('Cookie-Expiration', 'docid'), 116 'section' => $settings_section_general, 117 'type' => 'select', 118 'sanitize_callback' => [$this, 'docid_sanitize_cookie_expiration'], 119 'atts' => [ 120 'select_options' => [ 121 '1800' => '30 Minutes (Default)', 122 '3600' => '1 Hour', 123 '10800' => '3 Hours', 124 '86400' => '1 Day', 125 '604800' => '7 Days', 126 '1209600' => '14 Days', 127 '31536000' => '365 Days', 128 ], 129 'default' => '1800', 130 ] 131 ], 112 ] 132 113 ]; 133 114 -
docid/trunk/docid.php
r3303322 r3303341 14 14 * Plugin Name: DocID 15 15 * Description: The DocID plugin provides all the functionalities required for a secure and legally compliant authentication of healthcare professionals on your website. 16 * Version: 1. 0.916 * Version: 1.1.0 17 17 * Author: 8awake GmbH <support@docid.de> 18 18 * Author URI: https://docid.de -
docid/trunk/frontend/class-docid-frontend.php
r3298583 r3303341 97 97 set_transient('docid_skip_auth_' . $this->docid_hashed($skipAuthToken), true, 30); 98 98 99 setcookie(self::DOCID_COOKIE_SESSION_ID, $guestToken, ['expires' => time() + 3600, 'path' => '/', 'secure' => is_ssl(), 'httponly' => true, 'samesite' =>'Lax']);99 setcookie(self::DOCID_COOKIE_SESSION_ID, $guestToken, ['expires' => time() + 3600, 'path' => '/', 'domain' => $this->docid_get_cookie_domain(), 'secure' => is_ssl(), 'httponly' => true, 'samesite' => is_ssl() ? 'None' : 'Lax']); 100 100 101 101 $this->_docid_remove_auth_token($skipAuthToken); … … 148 148 set_transient('docid_skip_auth_' . $this->docid_hashed($skipAuthToken), true, 30); 149 149 150 setcookie(self::DOCID_COOKIE_SESSION_ID, $authToken, ['expires' => time() + 3600, 'path' => '/', 'secure' => is_ssl(), 'httponly' => true, 'samesite' =>'Lax']);150 setcookie(self::DOCID_COOKIE_SESSION_ID, $authToken, ['expires' => time() + 3600, 'path' => '/', 'domain' => $this->docid_get_cookie_domain(), 'secure' => is_ssl(), 'httponly' => true, 'samesite' => is_ssl() ? 'None' : 'Lax']); 151 151 152 152 } … … 256 256 delete_transient("docid_user_" . $this->docid_hashed(sanitize_text_field(wp_unslash($_COOKIE[self::DOCID_COOKIE_SESSION_ID])))); 257 257 } 258 setcookie(self::DOCID_COOKIE_SESSION_ID, '', ['expires' => time() + 1, 'path' => '/', 'secure' => is_ssl(), 'httponly' => true, 'samesite' => is_ssl() ? 'None' : 'Lax']);258 setcookie(self::DOCID_COOKIE_SESSION_ID, '', ['expires' => time() + 1, 'path' => '/', 'domain' => $this->docid_get_cookie_domain(), 'secure' => is_ssl(), 'httponly' => true, 'samesite' => is_ssl() ? 'None' : 'Lax']); 259 259 } 260 260 -
docid/trunk/includes/class-docid-base.php
r3303322 r3303341 100 100 101 101 /** 102 * Get cookie domain 103 * 104 * @return string 105 * @since 1.1.0 106 * @access public 107 */ 108 public function docid_get_cookie_domain() 109 { 110 $domain = parse_url(home_url(), PHP_URL_HOST); 111 $domain = preg_replace('/^www\./', '', $domain); 112 return "." . $domain; 113 } 114 115 /** 102 116 * Check if the current user is logged in 103 117 *
Note: See TracChangeset
for help on using the changeset viewer.