$system['region'] = '';
$system['postal-code'] = '';
$system['country-name'] = '';
- $system['homepage'] = DI::baseUrl()->get();
+ $system['homepage'] = DI::baseUrl();
$system['dob'] = '0000-00-00';
// Ensure that the user contains data
'self' => true,
'network' => Protocol::ACTIVITYPUB,
'name' => 'System Account',
- 'addr' => $system_actor_name . '@' . DI::baseUrl()->getHostname(),
+ 'addr' => $system_actor_name . '@' . DI::baseUrl()->getHost(),
'nick' => $system_actor_name,
'url' => DI::baseUrl() . '/friendica',
'pubkey' => $keys['pubkey'],
}
/**
- * Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces, accentuated letters and colon (:).
+ * Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces and accentuated letters.
*
* Password length is limited to 72 characters if the current default password hashing algorithm is Blowfish.
* From the manual: "Using the PASSWORD_BCRYPT as the algorithm, will result in the password parameter being
*/
public static function getPasswordRegExp(string $delimiter = null): string
{
- $allowed_characters = '!"#$%&\'()*+,-./;<=>?@[\]^_`{|}~';
+ $allowed_characters = ':!"#$%&\'()*+,-./;<=>?@[\]^_`{|}~';
if ($delimiter) {
$allowed_characters = preg_quote($allowed_characters, $delimiter);
}
if (!preg_match('/' . self::getPasswordRegExp('/') . '/', $password)) {
- throw new Exception(DI::l10n()->t('The password can\'t contain accentuated letters, white spaces or colons (:)'));
+ throw new Exception(DI::l10n()->t("The password can't contain white spaces nor accentuated letters"));
}
return self::updatePasswordHashed($uid, self::hashPassword($password));
$_SESSION['register'] = 1;
$_SESSION['openid'] = $openid_url;
- $openid = new LightOpenID(DI::baseUrl()->getHostname());
+ $openid = new LightOpenID(DI::baseUrl()->getHost());
$openid->identity = $openid_url;
$openid->returnUrl = DI::baseUrl() . '/openid';
$openid->required = ['namePerson/friendly', 'contact/email', 'namePerson'];
$l10n,
$user,
DI::config()->get('config', 'sitename'),
- DI::baseUrl()->get(),
+ DI::baseUrl(),
($register['password'] ?? '') ?: 'Sent in a previous email'
);
}
Thank you and welcome to %4$s.'));
$preamble = sprintf($preamble, $user['username'], DI::config()->get('config', 'sitename'));
- $body = sprintf($body, DI::baseUrl()->get(), $user['nickname'], $result['password'], DI::config()->get('config', 'sitename'));
+ $body = sprintf($body, DI::baseUrl(), $user['nickname'], $result['password'], DI::config()->get('config', 'sitename'));
$email = DI::emailer()
->newSystemMail()