6in4: send password unhashed
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 27 Jun 2014 10:40:44 +0000 (10:40 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 27 Jun 2014 10:40:44 +0000 (10:40 +0000)
The preferred he.net /nic/update endpoint expects the password or updatekey in
plain text and not as md5 sum, therfore remove the hashing operation from the
script.

This effectively renders the "updatekey" option redundant but we keep it around
for backwards compatibility. Both "option password" and "option updatekey" will
have end up in the "&password=" parameter of the update url and are passed through
unmodified.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 41358

package/network/ipv6/6in4/Makefile
package/network/ipv6/6in4/files/6in4.sh

index bd999721d8cc0b16445cddf8f336a33a7a98a708..1235ce53358fbeed5eb19ee478c30dd26d55d732 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6in4
-PKG_VERSION:=16
+PKG_VERSION:=17
 PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
index f9434936e396e04b175c44b0329d15207f747e97..5309cc4a5fd90cd27e77452294730c458b46a6e9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # 6in4.sh - IPv6-in-IPv4 tunnel backend
-# Copyright (c) 2010-2012 OpenWrt.org
+# Copyright (c) 2010-2014 OpenWrt.org
 
 [ -n "$INCLUDE_ONLY" ] || {
        . /lib/functions.sh
@@ -63,10 +63,6 @@ proto_6in4_setup() {
        proto_send_update "$cfg"
 
        [ -n "$tunnelid" -a -n "$username" -a \( -n "$password" -o -n "$updatekey" \) ] && {
-               [ "${#password}" == 32 -a -z "${password//[a-fA-F0-9]/}" ] || {
-                       password="$(echo -n "$password" | md5sum)"; password="${password%% *}"
-               }
-
                [ -n "$updatekey" ] && password="$updatekey"
 
                local url="http://ipv4.tunnelbroker.net/nic/update?username=$username&password=$password&hostname=$tunnelid"