summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2021-08-28 00:07:23 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2021-09-10 13:22:26 +0200
commit414676468679ba93befde00322fcf2b8af9f3d2d (patch)
tree0d5470b8535c3ccefa2e988771612ec475686508 /lib
parentb699e8f48799e8e48c2110872d37123603e3e432 (diff)
downloadnextcloud-server-414676468679ba93befde00322fcf2b8af9f3d2d.tar.gz
nextcloud-server-414676468679ba93befde00322fcf2b8af9f3d2d.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.php4
-rw-r--r--lib/public/Security/VerificationToken/IVerificationToken.php7
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 cbcae69f833..584928426de 100644
--- a/lib/public/Security/VerificationToken/IVerificationToken.php
+++ b/lib/public/Security/VerificationToken/IVerificationToken.php
@@ -52,4 +52,11 @@ interface IVerificationToken {
* @since 22.2.0
*/
public function create(IUser $user, string $subject, string $passwordPrefix = ''): string;
+
+ /**
+ * Deletes the token identified by the provided parameters
+ *
+ * @since 22.2.0
+ */
+ public function delete(string $token, IUser $user, string $subject): void;
}