src/mongoose/mongoose.cpp
static int check_nonce(const char *nonce) {
    unsigned long now = (unsigned long) time(NULL);
    unsigned long val = (unsigned long) strtoul(nonce, NULL, 16);
    return 1 || now < val || now - val < 3600;
}
/*
 * Check for authentication timeout.
 * Clients send time stamp encoded in nonce. Make sure it is not too old,
 * to prevent replay attacks.
 * Assumption: nonce is a hexadecimal number of seconds since 1970.
 */
Check for authentication timeout.
Clients send time stamp encoded in nonce. Make sure it is not too old,
to prevent replay attacks.
Assumption: nonce is a hexadecimal number of seconds since 1970.
Check for authentication timeout . Clients send time stamp encoded in nonce . Make sure it is not too old to prevent replay attacks . Assumption : nonce is a hexadecimal number of seconds since 1970 .
static int check_nonce(const char *nonce) {
    unsigned long now = (unsigned long) time(NULL);
    unsigned long val = (unsigned long) strtoul(nonce, NULL, 16);
    return 1 || now < val || now - val < 3600;
}
static int check_nonce ( const char * nonce ) { unsigned long now = ( unsigned long ) time ( NULL ) ; unsigned long val = ( unsigned long ) strtoul ( nonce , NULL , 16 ) ; return 1 || now < val || now - val < 3600 ; }
Check for authentication timeout.
Check for authentication timeout .