Plugin Directory

Changeset 3303341


Ignore:
Timestamp:
05/30/2025 06:12:16 AM (10 months ago)
Author:
docid
Message:

Updated plugin to version 1.1.0

Location:
docid/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • docid/trunk/README.txt

    r3303322 r3303341  
    55Requires PHP: 7.4
    66Tested up to: 6.8
    7 Stable tag: 1.0.9
     7Stable tag: 1.1.0
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • docid/trunk/admin/class-docid-settings.php

    r3298300 r3303341  
    110110                    'default' => '',
    111111                ]
    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            ]
    132113        ];
    133114
  • docid/trunk/docid.php

    r3303322 r3303341  
    1414 * Plugin Name:       DocID
    1515 * 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.9
     16 * Version:           1.1.0
    1717 * Author:            8awake GmbH <support@docid.de>
    1818 * Author URI:        https://docid.de
  • docid/trunk/frontend/class-docid-frontend.php

    r3298583 r3303341  
    9797            set_transient('docid_skip_auth_' . $this->docid_hashed($skipAuthToken), true, 30);
    9898
    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']);
    100100
    101101            $this->_docid_remove_auth_token($skipAuthToken);
     
    148148                    set_transient('docid_skip_auth_' . $this->docid_hashed($skipAuthToken), true, 30);
    149149
    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']);
    151151
    152152                }
     
    256256                delete_transient("docid_user_" . $this->docid_hashed(sanitize_text_field(wp_unslash($_COOKIE[self::DOCID_COOKIE_SESSION_ID]))));
    257257            }
    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']);
    259259        }
    260260
  • docid/trunk/includes/class-docid-base.php

    r3303322 r3303341  
    100100
    101101    /**
     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    /**
    102116     * Check if the current user is logged in
    103117     *
Note: See TracChangeset for help on using the changeset viewer.