| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/openid/store/__pycache__/ |
Upload File : |
�
|=�^ � � � g d �Z ddlmZ ddlmZmZmZmZ ddlmZ ddl Z e j
e j z ZdZ
dZ ed� � Zd � Ze
dfd
�Zdd�ZdS )
)�split�mkNonce�checkTimestamp� )� cryptutil)�strptime�strftime�gmtime�time)�timegmNiPF z%Y-%m-%dT%H:%M:%SZz0000-00-00T00:00:00Zc �� � | dt � } t t |t � � � � }n# t $ r d}Y nw xY w|dk rt d� � �|| t d� fS )aZ Extract a timestamp from the given nonce string
@param nonce_string: the nonce from which to extract the timestamp
@type nonce_string: str
@returns: A pair of a Unix timestamp and the salt characters
@returntype: (int, str)
@raises ValueError: if the nonce does not start with a correctly
formatted time string
N���r ztime out of range)�time_str_lenr r �time_fmt�AssertionError�
ValueError)�nonce_string�
timestamp_str� timestamps �4/usr/lib/python3/dist-packages/openid/store/nonce.pyr r s� � � !��,��/�M���8�M�8�<�<�=�=� � ��� � � �� � � ������1�}�}��,�-�-�-��l�<�=�=�1�1�1s �"4 �A�Ac � � t | � � \ }}|�t � � }||z
}||z }||cxk o|k nc S # t $ r Y dS w xY w)a8 Is the timestamp that is part of the specified nonce string
within the allowed clock-skew of the current time?
@param nonce_string: The nonce that is being checked
@type nonce_string: str
@param allowed_skew: How many seconds should be allowed for
completing the request, allowing for clock skew.
@type allowed_skew: int
@param now: The current time, as a Unix timestamp
@type now: int
@returntype: bool
@returns: Whether the timestamp is correctly formatted and within
the allowed skew of the current time.
NF)r r
r )r �allowed_skew�now�stamp�_�past�futures r r r - s� � �$'���&�&���q� �;��&�&�C� �\�!�� �|�#�� �u�&�&�&�&��&�&�&�&�&�� � � � ��u�u����s �>