diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-08 10:11:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-08 10:11:25 +0000 |
commit | f23e65dd523bb833546feebbba5e4e4985cfc1e6 (patch) | |
tree | ef896e8c88d2c6f2ddc0ab5cd5bbc23b4c6d9b8e | |
parent | 041a7e73ec0bc1ef9f7631486f3e4bd4472b4381 (diff) | |
download | aports-f23e65dd523bb833546feebbba5e4e4985cfc1e6.tar.bz2 aports-f23e65dd523bb833546feebbba5e4e4985cfc1e6.tar.xz |
main/ngircd: allow usernames with chars: +-@._
fixes #1608
-rw-r--r-- | main/ngircd/APKBUILD | 4 | ||||
-rw-r--r-- | main/ngircd/username.patch | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/main/ngircd/APKBUILD b/main/ngircd/APKBUILD index 2da55cc552..c1b56d0cd6 100644 --- a/main/ngircd/APKBUILD +++ b/main/ngircd/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=ngircd pkgver=19.2 -pkgrel=0 +pkgrel=1 pkgdesc="Next Generation IRC Daemon" url="http://ngircd.barton.de/" arch="all" @@ -12,6 +12,7 @@ makedepends="openssl-dev zlib-dev linux-pam-dev" install="$pkgname.pre-install" source="ftp://ftp.berlios.de/pub/$pkgname/$pkgname-$pkgver.tar.gz client_user_len.patch + username.patch $pkgname.initd " _builddir="$srcdir"/$pkgname-$pkgver @@ -49,4 +50,5 @@ package() { md5sums="8d71dd7da25f5da918a20202681501f0 ngircd-19.2.tar.gz 2c41fceb7fd3987f61109ff9f3bb60ee client_user_len.patch +2e7e32c6e7641d98e0e3166dd0d7f010 username.patch 628548a938f27fedcb6797c427bf0035 ngircd.initd" diff --git a/main/ngircd/username.patch b/main/ngircd/username.patch new file mode 100644 index 0000000000..db4cd97125 --- /dev/null +++ b/main/ngircd/username.patch @@ -0,0 +1,15 @@ +--- ./src/ngircd/irc-login.c.orig ++++ ./src/ngircd/irc-login.c +@@ -421,9 +421,9 @@ + /* User name: only alphanumeric characters are allowed! */ + ptr = Req->argv[0]; + while (*ptr) { +- if ((*ptr < '0' || *ptr > '9') && +- (*ptr < 'A' || *ptr > 'Z') && +- (*ptr < 'a' || *ptr > 'z')) { ++ if (!isalnum((int)*ptr) && ++ *ptr != '+' && *ptr != '-' && *ptr != '@' && ++ *ptr != '.' && *ptr != '_') { + Conn_Close(Client_Conn(Client), NULL, + "Invalid user name", true); + return DISCONNECTED; |