use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\Nav;
+use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
if (!x($newpass) || !x($confirm)) {
notice(L10n::t('Empty passwords are not allowed. Password unchanged.') . EOL);
$err = true;
- }
+ }
- // check if the old password was supplied correctly before changing it to the new value
- if (!User::authenticate(intval(local_user()), $_POST['opassword'])) {
- notice(L10n::t('Wrong password.') . EOL);
- $err = true;
- }
+ if (!Config::get('system', 'disable_password_exposed', false) && User::isPasswordExposed($newpass)) {
+ notice(L10n::t('The new password has been exposed in a public data dump, please choose another.') . EOL);
+ $err = true;
+ }
+
+ // check if the old password was supplied correctly before changing it to the new value
+ if (!User::authenticate(intval(local_user()), $_POST['opassword'])) {
+ notice(L10n::t('Wrong password.') . EOL);
+ $err = true;
+ }
if (!$err) {
$result = User::updatePassword(local_user(), $newpass);
* ACCOUNT SETTINGS
*/
- require_once('include/acl_selectors.php');
-
$profile = dba::selectFirst('profile', [], ['is-default' => true, 'uid' => local_user()]);
if (!DBM::is_result($profile)) {
notice(L10n::t('Unable to find your profile. Please contact your admin.') . EOL);
'$permissions' => L10n::t('Default Post Permissions'),
'$permdesc' => L10n::t("\x28click to open/close\x29"),
'$visibility' => $profile['net-publish'],
- '$aclselect' => populate_acl($a->user),
+ '$aclselect' => ACL::getFullSelectorHTML($a->user),
'$suggestme' => $suggestme,
'$blockwall'=> $blockwall, // array('blockwall', L10n::t('Allow friends to post to your profile page:'), !$blockwall, ''),
'$blocktags'=> $blocktags, // array('blocktags', L10n::t('Allow friends to tag your posts:'), !$blocktags, ''),
'$detailed_notif' => ['detailed_notif', L10n::t('Show detailled notifications'),
PConfig::get(local_user(), 'system', 'detailed_notif'),
- L10n::t('Per default the notificiation are condensed to a single notification per item. When enabled, every notification is displayed.')],
+ L10n::t('Per default, notifications are condensed to a single notification per item. When enabled every notification is displayed.')],
'$h_advn' => L10n::t('Advanced Account/Page Type Settings'),
'$h_descadvn' => L10n::t('Change the behaviour of this account for special situations'),