Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #33388

Closed (moved)
(moved)
Open
Created Feb 20, 2020 by Armin Huremagic@agix

Patch for #31967. Changed pseudo-random generator to random.SystemRandom.choice()

From fc8b3c59d23b2cc637e4db5cd8385720027f59e0 Mon Sep 17 00:00:00 2001 From: agix columbeff@gmail.com Date: Thu, 20 Feb 2020 01:24:24 +0100 Subject: [PATCH] Fix for #31967 (moved). Changed pseudo-random generator to random.SystemRandom.choice()


bridgedb/captcha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bridgedb/captcha.py b/bridgedb/captcha.py index b66972c..485974b 100644 --- a/bridgedb/captcha.py +++ b/bridgedb/captcha.py @@ -386,7 +386,7 @@ class GimpCaptcha(Captcha): and a challenge string (used for checking the client's solution). """ try:

  •        imageFilename = random.choice(os.listdir(self.cacheDir))
  •        imageFilename = random.SystemRandom().choice(os.listdir(self.cacheDir))
           imagePath = os.path.join(self.cacheDir, imageFilename)
           with open(imagePath) as imageFile:
               self.image = imageFile.read()

-- 2.17.1

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking