From: Andreas Gohr Date: Mon, 9 Jul 2007 08:26:00 +0000 (+0200) Subject: correct URL encoding on search redirects X-Git-Tag: 0.7.1~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94a175c653bdc28a698830b8c2298a214d79defc;p=contagged correct URL encoding on search redirects When a search returns a ingle entry only a forward to this entry is made. This patch makes sure the dn is correctly URL encoded to avoid problems with special chars in the DN. darcs-hash:20070709082600-6e07b-47d1d4cd22b257a4306fcf542a4002b230c18242.gz --- diff --git a/index.php b/index.php index 33e7e9c..e41237a 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ $list = ''; if(count($result)==1 && $_REQUEST['search']){ //only one result on a search -> display page - header("Location: entry.php?dn=".$result[0]['dn']); + header("Location: entry.php?dn=".rawurlencode($result[0]['dn'])); exit; }elseif(count($result)){ $keys = array_keys($result);