### Description
When using the [is_e164 function](https://kamailio.org/docs/modules/5.5.x/modules/siputils.html#sip… on a long Austrian number it doesn't seem to return true even if it's in e164 format.
#### Reproduction
The number in question, with some digits obfuscated for privacy, is +4322367108xxxxxx.
I can confirm that the number exists and is a valid one.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 10.2.1
```
* **Operating System**:
```
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux kamailio-primary 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3117
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3117(a)github.com>
Module: kamailio
Branch: master
Commit: f0cea1a7c03e400b4398795c2d8b0f7e45d1dfb5
URL: https://github.com/kamailio/kamailio/commit/f0cea1a7c03e400b4398795c2d8b0f7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-06-14T11:46:39+02:00
core: stop at the first config error on startup
- continuing to look for more errors to print them on one check can end
up in crashing because some internal interpreter structure may not be
filled properly
- new cli option --all-errors that can be used to enable printing
details for more detected config errors
---
Modified: src/core/cfg.y
Modified: src/core/globals.h
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/f0cea1a7c03e400b4398795c2d8b0f7…
Patch: https://github.com/kamailio/kamailio/commit/f0cea1a7c03e400b4398795c2d8b0f7…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index 713b6789b0..acf5e8c490 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -3854,6 +3854,9 @@ static void yyerror_at(struct cfg_pos* p, char* format, ...)
LM_CRIT("parse error in config file %s, line %d, column %d: %s\n",
p->fname, p->s_line, p->s_col, s);
cfg_errors++;
+ if(ksr_all_errors==0) {
+ ksr_exit(-1);
+ }
}
diff --git a/src/core/globals.h b/src/core/globals.h
index a4857cbf0c..03eb1ef897 100644
--- a/src/core/globals.h
+++ b/src/core/globals.h
@@ -213,6 +213,7 @@ extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
extern int http_reply_parse;
extern int _sr_ip_free_bind;
extern int ksr_verbose_startup;
+extern int ksr_all_errors;
extern int ksr_route_locks_size;
extern str _ksr_xavp_via_params;
extern str _ksr_xavp_via_fields;
diff --git a/src/main.c b/src/main.c
index cb0c92e357..e919a23274 100644
--- a/src/main.c
+++ b/src/main.c
@@ -206,6 +206,7 @@ Options:\n\
--modparam=modname:paramname:type:value set the module parameter\n\
type has to be 's' for string value and 'i' for int value, \n\
example: --modparam=corex:alias_subdomains:s:" NAME ".org\n\
+ --all-errors Print details about all config errors that can be detected\n\
-M nr Size of private memory allocated, in Megabytes\n\
-n processes Number of child processes to fork per interface\n\
(default: 8)\n"
@@ -482,6 +483,7 @@ int child_rank = 0;
int ser_kill_timeout=DEFAULT_SER_KILL_TIMEOUT;
int ksr_verbose_startup = 0;
+int ksr_all_errors = 0;
/* cfg parsing */
int cfg_errors=0;
@@ -2018,6 +2020,7 @@ int main(int argc, char** argv)
{"debug", required_argument, 0, KARGOPTVAL + 8},
{"cfg-print", no_argument, 0, KARGOPTVAL + 9},
{"atexit", required_argument, 0, KARGOPTVAL + 10},
+ {"all-errors", no_argument, 0, KARGOPTVAL + 11},
{0, 0, 0, 0 }
};
@@ -2128,6 +2131,9 @@ int main(int argc, char** argv)
goto error;
}
break;
+ case KARGOPTVAL+11:
+ ksr_all_errors = 1;
+ break;
default:
if (c == 'h' || (optarg && strcmp(optarg, "-h") == 0)) {
@@ -2317,6 +2323,7 @@ int main(int argc, char** argv)
case KARGOPTVAL+8:
case KARGOPTVAL+9:
case KARGOPTVAL+10:
+ case KARGOPTVAL+11:
break;
/* long options */
Module: kamailio
Branch: master
Commit: 93dccff9391e1336e1a37add1d07b4058b7593e8
URL: https://github.com/kamailio/kamailio/commit/93dccff9391e1336e1a37add1d07b40…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-06-14T10:01:27+02:00
modules: readme files regenerated - auth ... [skip ci]
---
Modified: src/modules/auth/README
---
Diff: https://github.com/kamailio/kamailio/commit/93dccff9391e1336e1a37add1d07b40…
Patch: https://github.com/kamailio/kamailio/commit/93dccff9391e1336e1a37add1d07b40…
---
diff --git a/src/modules/auth/README b/src/modules/auth/README
index 25c448901d..f846d752d9 100644
--- a/src/modules/auth/README
+++ b/src/modules/auth/README
@@ -836,6 +836,7 @@ if (!auth_check("$fd", "subscriber", "1")) {
+ 4 - build challenge header with qop=auth and add it to avp
+ 8 - build challenge header with qop=auth-int and add it to avp
+ 16 - build challenge header with stale=true
+ + 32 - don't invalidate nc on authentication failure
* method - the method to be used for authentication. This parameter
is optional and if not set is the first "word" on the request-line.
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
This change modifies `pv_www_authenticate` and related functions to add flag 32. If the flag is set and `nonce_count` is enabled then we skip updating nc in `pre_auth`. On success we call `check_nonce` once more to do the nc update. This can be used to chain calls to authenticate against multiple passwords.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3133
-- Commit Summary --
* auth: Add flag for not invalidating nc on auth failure
-- File Changes --
M src/modules/auth/api.c (16)
M src/modules/auth/api.h (3)
M src/modules/auth/auth_mod.c (31)
M src/modules/auth/doc/auth_functions.xml (4)
M src/modules/auth/nc.c (4)
M src/modules/auth/nc.h (2)
M src/modules/auth/nonce.c (4)
M src/modules/auth/nonce.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3133.patchhttps://github.com/kamailio/kamailio/pull/3133.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3133
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3133(a)github.com>