@@ -9588,7 +9588,7 @@ priv_check_cached_key(struct http_request_info *phr)
95889588 if (phr->ssl_flag != cti->ssl_flag) {
95899589 break;
95909590 }
9591- if (current_time >= cti->expiry_time) {
9591+ if (cti->expiry_time > 0 && current_time >= cti->expiry_time) {
95929592 break;
95939593 }
95949594 if (current_time >= cti->refresh_time) {
@@ -9611,7 +9611,7 @@ priv_check_cached_key(struct http_request_info *phr)
96119611 if (cti && cti->used && cti->cmd == ULS_GET_API_KEY
96129612 && !ej_ip_cmp(&phr->ip, &cti->origin_ip)
96139613 && phr->ssl_flag == cti->ssl_flag
9614- && current_time < cti->expiry_time
9614+ && (cti->expiry_time <= 0 || current_time < cti->expiry_time)
96159615 && phr->role <= cti->role) {
96169616 copy_cti_to_phr(phr, cti, current_time);
96179617 rdtscll(tsc_end);
@@ -9635,7 +9635,7 @@ priv_check_cached_key(struct http_request_info *phr)
96359635 if (cti && cti->used && cti->cmd == ULS_GET_API_KEY
96369636 && !ej_ip_cmp(&phr->ip, &cti->origin_ip)
96379637 && phr->ssl_flag == cti->ssl_flag
9638- && current_time < cti->expiry_time
9638+ && (cti->expiry_time <= 0 || current_time < cti->expiry_time)
96399639 && phr->role <= cti->role) {
96409640 copy_cti_to_phr(phr, cti, current_time);
96419641 rdtscll(tsc_end);
@@ -16869,7 +16869,7 @@ unpriv_check_cached_key(struct http_request_info *phr)
1686916869 if (phr->ssl_flag != cti->ssl_flag) {
1687016870 break;
1687116871 }
16872- if (current_time >= cti->expiry_time) {
16872+ if (cti->expiry_time > 0 && current_time >= cti->expiry_time) {
1687316873 break;
1687416874 }
1687516875 if (current_time >= cti->refresh_time) {
@@ -16892,7 +16892,7 @@ unpriv_check_cached_key(struct http_request_info *phr)
1689216892 if (cti && cti->used && cti->cmd == ULS_GET_API_KEY
1689316893 && !ej_ip_cmp(&phr->ip, &cti->origin_ip)
1689416894 && phr->ssl_flag == cti->ssl_flag
16895- && current_time < cti->expiry_time
16895+ && (cti->expiry_time <= 0 || current_time < cti->expiry_time)
1689616896 && phr->role <= cti->role) {
1689716897 copy_cti_to_phr(phr, cti, current_time);
1689816898 rdtscll(tsc_end);
@@ -16916,7 +16916,7 @@ unpriv_check_cached_key(struct http_request_info *phr)
1691616916 if (cti && cti->used && cti->cmd == ULS_GET_API_KEY
1691716917 && !ej_ip_cmp(&phr->ip, &cti->origin_ip)
1691816918 && phr->ssl_flag == cti->ssl_flag
16919- && current_time < cti->expiry_time
16919+ && (cti->expiry_time <= 0 || current_time < cti->expiry_time)
1692016920 && phr->role <= cti->role) {
1692116921 copy_cti_to_phr(phr, cti, current_time);
1692216922 rdtscll(tsc_end);
0 commit comments