[sr-dev] git:master:73e3e5d1: siputils: fixed condition for alphanum matching

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 16 12:04:44 CEST 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-10-16T12:04:26+02:00

siputils: fixed condition for alphanum matching

---

Modified: src/modules/siputils/checks.c

---

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

---

diff --git a/src/modules/siputils/checks.c b/src/modules/siputils/checks.c
index 76f5cac294..1db6901c4c 100644
--- a/src/modules/siputils/checks.c
+++ b/src/modules/siputils/checks.c
@@ -896,7 +896,7 @@ int ki_is_alphanum(sip_msg_t *msg, str *tval)
 	for(; i<tval->len; i++) {
 		if( !((tval->s[i]>='0' && tval->s[i]<='9')
 				|| (tval->s[i]>='A' && tval->s[i]<='Z')
-				|| (tval->s[i]>='z' && tval->s[i]<='z')) )
+				|| (tval->s[i]>='a' && tval->s[i]<='z')) )
 			return -3;
 	}
 
@@ -935,7 +935,7 @@ int ki_is_alphanumex(sip_msg_t *msg, str *tval, str *eset)
 	for(; i<tval->len; i++) {
 		if( !((tval->s[i]>='0' && tval->s[i]<='9')
 				|| (tval->s[i]>='A' && tval->s[i]<='Z')
-				|| (tval->s[i]>='z' && tval->s[i]<='z')) ) {
+				|| (tval->s[i]>='a' && tval->s[i]<='z')) ) {
 			if(eset==NULL || eset->len<=0) {
 				return -3;
 			}




More information about the sr-dev mailing list