Skip to content

Commit

Permalink
Add fixes to Tunnel module virtualmin/virtualmin-gpl#358 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jan 25, 2022
1 parent 8a617c5 commit 7d12e1a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion authentic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,8 @@ sub theme_redirect

if (!theme_redirect_download($url)) {
$main::ignore_errors = 1;
set_theme_temp_data('redirected', $url);
set_theme_temp_data('redirected', $url)
if (!theme_set_redirect_forbidden($url));
$main::ignore_errors = 0;
print "Location: $url\n\n";
}
Expand All @@ -1347,6 +1348,18 @@ sub theme_redirect_url_alterer
}
}

sub theme_set_redirect_forbidden
{
my ($url) = @_;

if ($url &&
($url =~ /\/tunnel\/link\.cgi\//))
{
return 1;
}
return 0;
}

sub theme_header_redirect_download
{
my ($url, $delay, $message) = @_;
Expand Down
2 changes: 1 addition & 1 deletion theme.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
desc=Authentic Theme
longdesc=Webmin/Usermin/Virtualmin/Cloudmin theme based on Bootstrap and Font Awesome (https://github.com/authentic-theme/authentic-theme)
version=19.85-beta2
mversion=17
mversion=18
depends=1.985 1.832
depends_reason=https://github.com/webmin/webmin/commit/ae6921a
webmin=1
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/js/bundle.min.js

Large diffs are not rendered by default.

Binary file modified unauthenticated/js/bundle.min.js.gz
Binary file not shown.

0 comments on commit 7d12e1a

Please sign in to comment.