[sr-dev] git:master:c078256b: Merge pull request #313 from vance-od/patch-1

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 3 11:32:19 CEST 2015


Module: kamailio
Branch: master
Commit: c078256b927ae4b30ba9e5ae9595e5b2084dcdb6
URL: https://github.com/kamailio/kamailio/commit/c078256b927ae4b30ba9e5ae9595e5b2084dcdb6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-09-03T11:32:10+02:00

Merge pull request #313 from vance-od/patch-1

auth: fixed issue when during registration nonce expired, after backwards time shift

---

Modified: modules/auth/nonce.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c078256b927ae4b30ba9e5ae9595e5b2084dcdb6.diff
Patch: https://github.com/kamailio/kamailio/commit/c078256b927ae4b30ba9e5ae9595e5b2084dcdb6.patch

---

diff --git a/modules/auth/nonce.c b/modules/auth/nonce.c
index 95b967e..025d0d7 100644
--- a/modules/auth/nonce.c
+++ b/modules/auth/nonce.c
@@ -357,7 +357,13 @@ int check_nonce(auth_body_t* auth, str* secret1, str* secret2,
 		   different length (for example because of different auth.
 		   checks)..  Therefore we force credentials to be rebuilt by UAC
 		   without prompting for password */
-		return 4;
+		/* if current time is less than start time, reset the start time 
+            	(e.g., after start, the system clock was set in the past) */ 
+        	t=time(0); 
+        	if (t < up_since) 
+			up_since = t;
+		if (since < t)
+			return 4; 
 	}
 	t=time(0);
 	if (unlikely((since > t) && ((since-t) > nonce_auth_max_drift) )){




More information about the sr-dev mailing list