Francois Gouget : testbot/web: Always check the https connection the same way.

Alexandre Julliard julliard at winehq.org
Wed Sep 25 16:21:27 CDT 2019


Module: tools
Branch: master
Commit: 613132f21c51ec8bb32dca9acb942713a7d7925c
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=613132f21c51ec8bb32dca9acb942713a7d7925c

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Sep 25 08:52:33 2019 +0200

testbot/web: Always check the https connection the same way.

The standard way the TestBot checks the https connection is with
'$UseSSL && ! SecureConnection())' so use that form in CheckSecurePage()
too. This actually simplifies it too.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/CGI/PageBase.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/testbot/lib/WineTestBot/CGI/PageBase.pm b/testbot/lib/WineTestBot/CGI/PageBase.pm
index d1442c1..c1a8c8c 100644
--- a/testbot/lib/WineTestBot/CGI/PageBase.pm
+++ b/testbot/lib/WineTestBot/CGI/PageBase.pm
@@ -73,12 +73,10 @@ sub CheckSecurePage($$)
 {
   my ($self, $Page) = @_;
 
-  if (! $UseSSL || SecureConnection())
+  if ($UseSSL && ! SecureConnection())
   {
-    return;
+    $self->Redirect($Page, MakeSecureURL($ENV{"REQUEST_URI"}));
   }
-
-  $self->Redirect($Page, MakeSecureURL($ENV{"REQUEST_URI"}));
 }
 
 sub GenerateHttpHeaders($)




More information about the wine-cvs mailing list