X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=795997868305ff09b2ada3614cf7a9a8d1089cf3;hb=d3e47797485d671bd6f806cd0ba72f499e049a66;hp=76639e2d40298bed935e2e9bc8658132d00576ef;hpb=60e0f0426133544eaaea7ff84da5f02ca86bd8cc;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index 76639e2d40..7959978683 100644 --- a/lib/util.php +++ b/lib/util.php @@ -159,6 +159,11 @@ function common_munge_password($password, $id) function common_check_user($nickname, $password) { + // empty nickname always unacceptable + if (empty($nickname)) { + return false; + } + $authenticatedUser = false; if (Event::handle('StartCheckPassword', array($nickname, $password, &$authenticatedUser))) { @@ -1488,7 +1493,15 @@ function common_copy_args($from) $to = array(); $strip = get_magic_quotes_gpc(); foreach ($from as $k => $v) { - $to[$k] = ($strip) ? stripslashes($v) : $v; + if($strip) { + if(is_array($v)) { + $to[$k] = common_copy_args($v); + } else { + $to[$k] = stripslashes($v); + } + } else { + $to[$k] = $v; + } } return $to; } @@ -1516,7 +1529,8 @@ function common_user_uri(&$user) function common_notice_uri(&$notice) { return common_local_url('shownotice', - array('notice' => $notice->id)); + array('notice' => $notice->id), + null, null, false); } // 36 alphanums - lookalikes (0, O, 1, I) = 32 chars = 5 bits