Control: tag -1 patch pending

Michael Stapelberg <stapelb...@debian.org> (2016-01-11):
> Helmut Grohne <hel...@subdivi.de> writes:
> > Start linphone. Click "Options", select "Preferences". Select tab
> > "Manage SIP Accounts". Click the "Wizard" button. Click "Forward".
> > Select "I have already a sip account ...". Click "Forward". Enter
> > arbitray 6 digits into the username field. Enter an arbitrary non-empty
> > character sequence into the password field. Enter a valid domain (such
> > as "sipgate.com") into the domain field.
> >
> > Expected behaviour: The "Apply" button would be clickable.
> > Observed behaviour: The "Apply" button is not clickable.
> >
> > Further details. The acceptance of the input data seems to depend on the
> > value in the username field to start with a letter. This precludes
> > sipgate users from using linphone.
> 
> I also ran into this bug.

Yeah, getting this with Freephonie as well (all-digit usernames).

> A workaround is to prefix your sipgate username (e.g. 1234) with a
> letter (e.g. a1234). Login will fail, but linphone will allow you to add
> the account. Afterwards, choose Options → Preferences → Manage SIP
> Accounts, select the account in question, click the Edit button, remove
> the letter.
> 
> Upstream says this was fixed in 3.7.0:
> https://lists.gnu.org/archive/html/linphone-users/2015-01/msg00005.html

I've initially added a local patch to allow all-digits, and checked
phoning was OK. Then I switched to reporting, saw this bug report, and
looked upstream for their fix(es).

Applying the patch to relax username checks gave me a context error, so
I went a bit more in the past and grabbed another patch to relax domain
checks. I've checked it works fine in jessie.

You'll find attached the nmudiff for my upload to DELAYED/5, along with
the prospective patch for a jessie-pu upload.


KiBi.
diff -Nru linphone-3.6.1/debian/changelog linphone-3.6.1/debian/changelog
--- linphone-3.6.1/debian/changelog	2016-01-18 12:48:38.000000000 +0100
+++ linphone-3.6.1/debian/changelog	2016-05-23 02:03:10.000000000 +0200
@@ -1,3 +1,13 @@
+linphone (3.6.1-2.6) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply upstream patches to relax domain and username checks in the
+    setup wizard (Closes: #700045, #703282):
+     - wizard-relax-domain.patch: Allow [A-Z] on the left.
+     - wizard-relax-username.patch: Allow [0-9] on the left.
+
+ -- Cyril Brulebois <k...@debian.org>  Mon, 23 May 2016 02:00:59 +0200
+
 linphone (3.6.1-2.5) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru linphone-3.6.1/debian/patches/series linphone-3.6.1/debian/patches/series
--- linphone-3.6.1/debian/patches/series	2016-01-18 12:47:14.000000000 +0100
+++ linphone-3.6.1/debian/patches/series	2016-05-23 02:00:38.000000000 +0200
@@ -8,3 +8,5 @@
 libav10.patch
 libav11.patch
 ffmpeg_2.9.patch
+wizard-relax-domain.patch
+wizard-relax-username.patch
diff -Nru linphone-3.6.1/debian/patches/wizard-relax-domain.patch linphone-3.6.1/debian/patches/wizard-relax-domain.patch
--- linphone-3.6.1/debian/patches/wizard-relax-domain.patch	1970-01-01 01:00:00.000000000 +0100
+++ linphone-3.6.1/debian/patches/wizard-relax-domain.patch	2016-05-23 02:00:09.000000000 +0200
@@ -0,0 +1,19 @@
+commit 5b8cb6465098730f0de1910e3f009b798d4ff941
+Author: Ghislain MARY <ghislain.m...@belledonne-communications.com>
+Date:   Tue Jul 2 13:18:13 2013 +0200
+
+    Regular expression on domain in the account assistant was too strict.
+
+diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c
+index f4374c5..0c15e60 100644
+--- a/gtk/setupwizard.c
++++ b/gtk/setupwizard.c
+@@ -60,7 +60,7 @@ static int all_account_information_entered(GtkWidget *w) {
+ 	if (gtk_entry_get_text_length(username) > 0 &&
+ 	gtk_entry_get_text_length(domain) > 0 &&
+ 	g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
+-	g_regex_match_simple("^(sip:)?([a-z0-9]+([\\.-][a-z0-9]+)*)+\\.[a-z]{2,}$", gtk_entry_get_text(domain), 0, 0)) {
++	g_regex_match_simple("^(sip:)?([a-zA-Z0-9]+([\\.-][a-zA-Z0-9]+)*)$", gtk_entry_get_text(domain), 0, 0)) {
+ 		return 1;
+ 	}
+ 	return 0;
diff -Nru linphone-3.6.1/debian/patches/wizard-relax-username.patch linphone-3.6.1/debian/patches/wizard-relax-username.patch
--- linphone-3.6.1/debian/patches/wizard-relax-username.patch	1970-01-01 01:00:00.000000000 +0100
+++ linphone-3.6.1/debian/patches/wizard-relax-username.patch	2016-05-23 02:00:22.000000000 +0200
@@ -0,0 +1,19 @@
+commit eb9886df65cb7f9c5cc513b98e3844c385779af6
+Author: Margaux Clerc <clercma...@gmail.com>
+Date:   Wed Oct 16 12:20:14 2013 +0200
+
+    accept in Wizzard usernames with digits
+
+diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c
+index 47a9074..6b596dc 100644
+--- a/gtk/setupwizard.c
++++ b/gtk/setupwizard.c
+@@ -59,7 +59,7 @@ static int all_account_information_entered(GtkWidget *w) {
+ 
+ 	if (gtk_entry_get_text_length(username) > 0 &&
+ 	gtk_entry_get_text_length(domain) > 0 &&
+-	g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
++	g_regex_match_simple("^[a-zA-Z0-9]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
+ 	g_regex_match_simple("^(sip:)?([a-zA-Z0-9]+([\\.-][a-zA-Z0-9]+)*)$", gtk_entry_get_text(domain), 0, 0)) {
+ 		return 1;
+ 	}
diff -Nru linphone-3.6.1/debian/changelog linphone-3.6.1/debian/changelog
--- linphone-3.6.1/debian/changelog	2014-08-16 17:01:47.000000000 +0200
+++ linphone-3.6.1/debian/changelog	2016-05-23 02:17:08.000000000 +0200
@@ -1,3 +1,13 @@
+linphone (3.6.1-2.4+deb8u1) jessie; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply upstream patches to relax domain and username checks in the
+    setup wizard (Closes: #700045, #703282):
+     - wizard-relax-domain.patch: Allow [A-Z] on the left.
+     - wizard-relax-username.patch: Allow [0-9] on the left.
+
+ -- Cyril Brulebois <k...@debian.org>  Mon, 23 May 2016 02:15:59 +0200
+
 linphone (3.6.1-2.4) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru linphone-3.6.1/debian/patches/series linphone-3.6.1/debian/patches/series
--- linphone-3.6.1/debian/patches/series	2014-08-13 13:03:32.000000000 +0200
+++ linphone-3.6.1/debian/patches/series	2016-05-23 02:15:47.000000000 +0200
@@ -7,3 +7,5 @@
 #kfreebsd.patch
 libav10.patch
 libav11.patch
+wizard-relax-domain.patch
+wizard-relax-username.patch
diff -Nru linphone-3.6.1/debian/patches/wizard-relax-domain.patch linphone-3.6.1/debian/patches/wizard-relax-domain.patch
--- linphone-3.6.1/debian/patches/wizard-relax-domain.patch	1970-01-01 01:00:00.000000000 +0100
+++ linphone-3.6.1/debian/patches/wizard-relax-domain.patch	2016-05-23 02:15:40.000000000 +0200
@@ -0,0 +1,19 @@
+commit 5b8cb6465098730f0de1910e3f009b798d4ff941
+Author: Ghislain MARY <ghislain.m...@belledonne-communications.com>
+Date:   Tue Jul 2 13:18:13 2013 +0200
+
+    Regular expression on domain in the account assistant was too strict.
+
+diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c
+index f4374c5..0c15e60 100644
+--- a/gtk/setupwizard.c
++++ b/gtk/setupwizard.c
+@@ -60,7 +60,7 @@ static int all_account_information_entered(GtkWidget *w) {
+ 	if (gtk_entry_get_text_length(username) > 0 &&
+ 	gtk_entry_get_text_length(domain) > 0 &&
+ 	g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
+-	g_regex_match_simple("^(sip:)?([a-z0-9]+([\\.-][a-z0-9]+)*)+\\.[a-z]{2,}$", gtk_entry_get_text(domain), 0, 0)) {
++	g_regex_match_simple("^(sip:)?([a-zA-Z0-9]+([\\.-][a-zA-Z0-9]+)*)$", gtk_entry_get_text(domain), 0, 0)) {
+ 		return 1;
+ 	}
+ 	return 0;
diff -Nru linphone-3.6.1/debian/patches/wizard-relax-username.patch linphone-3.6.1/debian/patches/wizard-relax-username.patch
--- linphone-3.6.1/debian/patches/wizard-relax-username.patch	1970-01-01 01:00:00.000000000 +0100
+++ linphone-3.6.1/debian/patches/wizard-relax-username.patch	2016-05-23 02:15:40.000000000 +0200
@@ -0,0 +1,19 @@
+commit eb9886df65cb7f9c5cc513b98e3844c385779af6
+Author: Margaux Clerc <clercma...@gmail.com>
+Date:   Wed Oct 16 12:20:14 2013 +0200
+
+    accept in Wizzard usernames with digits
+
+diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c
+index 47a9074..6b596dc 100644
+--- a/gtk/setupwizard.c
++++ b/gtk/setupwizard.c
+@@ -59,7 +59,7 @@ static int all_account_information_entered(GtkWidget *w) {
+ 
+ 	if (gtk_entry_get_text_length(username) > 0 &&
+ 	gtk_entry_get_text_length(domain) > 0 &&
+-	g_regex_match_simple("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
++	g_regex_match_simple("^[a-zA-Z0-9]+[a-zA-Z0-9.\\-_]{2,}$", gtk_entry_get_text(username), 0, 0) &&
+ 	g_regex_match_simple("^(sip:)?([a-zA-Z0-9]+([\\.-][a-zA-Z0-9]+)*)$", gtk_entry_get_text(domain), 0, 0)) {
+ 		return 1;
+ 	}

Attachment: signature.asc
Description: Digital signature

Reply via email to