~jan0sch/smederee

Showing details for patch d2a107c19e5ee33bde5ab4a14a3588544a631117.
2023-08-09 (Wed), 8:05 AM - Jens Grassel - d2a107c19e5ee33bde5ab4a14a3588544a631117

Hub: Adjust time delay for password reset to never be zero.

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala with 1 added and 1 removed lines
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala
--- old-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala	2025-01-15 12:39:10.187826204 +0000
+++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala	2025-01-15 12:39:10.187826204 +0000
@@ -87,7 +87,7 @@
                 case None =>
                   for {
                     delay <- Sync[F]
-                      .delay(scala.util.Random.nextInt(3)) // Prevent fast response to avoid email guessing.
+                      .delay(scala.util.Random.nextInt(2) + 1) // Prevent fast response to avoid email guessing.
                     _        <- Sync[F].sleep(FiniteDuration(delay, SECONDS))
                     response <- SeeOther(Location(resetSentPath))
                   } yield response