aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-22 13:38:59 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-22 13:38:59 +0100
commit19eaed60d57e0db936b4161d1976243cb322efc2 (patch)
treea18c18c4dca31c38f9b22df535833dbbf1b392b2 /mod
parent5f7715529d147510c66d0bf68edcca09e7fe3f1b (diff)
parent808180ce5f9471aa36faf8861fb84d04b412f412 (diff)
downloadvolse-hubzilla-19eaed60d57e0db936b4161d1976243cb322efc2.tar.gz
volse-hubzilla-19eaed60d57e0db936b4161d1976243cb322efc2.tar.bz2
volse-hubzilla-19eaed60d57e0db936b4161d1976243cb322efc2.zip
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'mod')
-rwxr-xr-xmod/register.php10
-rwxr-xr-xmod/regmod.php5
2 files changed, 15 insertions, 0 deletions
diff --git a/mod/register.php b/mod/register.php
index 388b3e250..6d0e2700b 100755
--- a/mod/register.php
+++ b/mod/register.php
@@ -150,6 +150,16 @@ function register_post(&$a) {
if(count($r))
$err .= t('Nickname is already registered. Please choose another.') . EOL;
+ // Check deleted accounts that had this nickname. Doesn't matter to us,
+ // but could be a security issue for federated platforms.
+
+ $r = q("SELECT * FROM `userd`
+ WHERE `username` = '%s' LIMIT 1",
+ dbesc($nickname)
+ );
+ if(count($r))
+ $err .= t('Nickname was once registered here and may not be re-used. Please choose another.') . EOL;
+
if(strlen($err)) {
notice( $err );
return;
diff --git a/mod/regmod.php b/mod/regmod.php
index 17e728ba2..21f41eb01 100755
--- a/mod/regmod.php
+++ b/mod/regmod.php
@@ -64,6 +64,11 @@ function user_allow($hash) {
}
+
+// This does not have to go through user_remove() and save the nickname
+// permanently against re-registration, as the person was not yet
+// allowed to have friends on this system
+
function user_deny($hash) {
$register = q("SELECT * FROM `register` WHERE `hash` = '%s' LIMIT 1",