diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-08-28 00:07:23 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-09-09 19:23:04 +0200 |
commit | 0dee717c94468afeb139d9e8d9322b5fd26974b6 (patch) | |
tree | 3a286343cca070b5c3c4473078cebb909af4b7a2 /lib | |
parent | a20de15b4388e4d57b0fb26eaeca98cd6ba817f8 (diff) | |
download | nextcloud-server-0dee717c94468afeb139d9e8d9322b5fd26974b6.tar.gz nextcloud-server-0dee717c94468afeb139d9e8d9322b5fd26974b6.zip |
Confirm mails only per POST
- this is to avoid automatic confirmation by certain softwares that open
links
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Security/VerificationToken/VerificationToken.php | 4 | ||||
-rw-r--r-- | lib/public/Security/VerificationToken/IVerificationToken.php | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Security/VerificationToken/VerificationToken.php b/lib/private/Security/VerificationToken/VerificationToken.php index ff3cb90727a..c85e0e7b5a1 100644 --- a/lib/private/Security/VerificationToken/VerificationToken.php +++ b/lib/private/Security/VerificationToken/VerificationToken.php @@ -122,4 +122,8 @@ class VerificationToken implements IVerificationToken { return $token; } + + public function delete(string $token, IUser $user, string $subject): void { + $this->config->deleteUserValue($user->getUID(), 'core', $subject); + } } diff --git a/lib/public/Security/VerificationToken/IVerificationToken.php b/lib/public/Security/VerificationToken/IVerificationToken.php index c5f19e5de7f..e1d9203ec3b 100644 --- a/lib/public/Security/VerificationToken/IVerificationToken.php +++ b/lib/public/Security/VerificationToken/IVerificationToken.php @@ -52,4 +52,11 @@ interface IVerificationToken { * @since 23.0.0 */ public function create(IUser $user, string $subject, string $passwordPrefix = ''): string; + + /** + * Deletes the token identified by the provided parameters + * + * @since 23.0.0 + */ + public function delete(string $token, IUser $user, string $subject): void; } |