Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX - Fix blank pages. #4223

Merged

Conversation

corentin-soriano
Copy link
Contributor

@corentin-soriano corentin-soriano commented Jun 20, 2024

Step to reproduce:

Show source code of blank page :

Show source code of blank page :
```html
<html>
<body>
<!--StartFragment-->
  | <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-- | --
  |  
  | <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
  |  
  | <head>
  | 
  | <meta name="viewport" content="width=device-width, initial-scale=1" />
  | <meta http-equiv="x-ua-compatible" content="ie=edge" />
  | <title>Teampass</title>
  | <script type='text/javascript'>
  | //<![CDATA[
  | if (window.location.href.indexOf('page=') === -1 &&
  | (window.location.href.indexOf('otv=') === -1 &&
  | window.location.href.indexOf('action=') === -1)
  | ) {
  | if (window.location.href.indexOf('session_over=true') !== -1) {
  | location.replace('./includes/core/logout.php');
  | }
  | }
  | //]]>
  | </script>
  |  
  | <!-- IonIcons -->
  | <link rel="stylesheet" href="includes/css/ionicons.min.css">
  | <!-- Theme style -->
  | <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css">
  | <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css" type="text/css" />
  | <link rel="stylesheet" href="plugins/select2/css/select2.min.css" type="text/css" />
  | <!--<link rel="stylesheet" href="plugins/select2/css/select2-bootstrap.min.css" type="text/css" />-->
  | <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css" type="text/css" />
  | <!-- Theme style -->
  | <link rel="stylesheet" href="includes/css/teampass.css">
  | <!-- Google Font: Source Sans Pro -->
  | <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css">
  | <!-- Altertify -->
  | <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css" />
  | <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css" />
  | <!-- Toastr -->
  | <link rel="stylesheet" href="plugins/toastr/toastr.min.css" />
  | <!-- favicon -->
  | <link rel="shortcut icon" type="image/png" href="https://teampass.local/favicon.ico"/>
  | <!-- Custom style -->
  | </head>
  |  
  |  
  |  
  |  
  |  
  | <script language="javascript" type="text/javascript">
  | console.log("test");
  | sessionStorage.clear();
  | store.set(
  | "teampassSettings", {},
  | function(teampassSettings) {}
  | );
  | window.location.href = "index.php";
  | </script><script type="text/javascript" src="https://host/includes/libraries/csrfp/js/csrfprotector.js"></script>

<!--EndFragment-->
</body>
</html>
```<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>

<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>

<head>
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <title>Teampass</title>
    <script type='text/javascript'>
        //<![CDATA[
        if (window.location.href.indexOf('page=') === -1 &&
            (window.location.href.indexOf('otv=') === -1 &&
                window.location.href.indexOf('action=') === -1)
        ) {
            if (window.location.href.indexOf('session_over=true') !== -1) {
                location.replace('./includes/core/logout.php');
            }
        }
        //]]>
    </script>

    <!-- IonIcons -->
    <link rel="stylesheet" href="[includes/css/ionicons.min.css](https://test.fr/includes/css/ionicons.min.css)">
    <!-- Theme style -->
    <link rel="stylesheet" href="[plugins/adminlte/css/adminlte.min.css](https://test.fr/plugins/adminlte/css/adminlte.min.css)">
    <link rel="stylesheet" href="[plugins/pace-progress/themes/corner-indicator.css](https://teampass.local/plugins/pace-progress/themes/corner-indicator.css)" type="text/css" />
    <link rel="stylesheet" href="[plugins/select2/css/select2.min.css](https://teampass.local/plugins/select2/css/select2.min.css)" type="text/css" />
    <!--<link rel="stylesheet" href="plugins/select2/css/select2-bootstrap.min.css" type="text/css" />-->
    <link rel="stylesheet" href="[plugins/select2/theme/select2-bootstrap4.min.css](https://teampass.local/plugins/select2/theme/select2-bootstrap4.min.css)" type="text/css" />
    <!-- Theme style -->
    <link rel="stylesheet" href="[includes/css/teampass.css](https://teampass.local/includes/css/teampass.css)">
    <!-- Google Font: Source Sans Pro -->
    <link rel="stylesheet" type="text/css" href="[includes/fonts/fonts.css](https://teampass.local/includes/fonts/fonts.css)">
    <!-- Altertify -->
    <link rel="stylesheet" href="[plugins/alertifyjs/css/alertify.min.css](https://teampass.local/plugins/alertifyjs/css/alertify.min.css)" />
    <link rel="stylesheet" href="[plugins/alertifyjs/css/themes/bootstrap.min.css](https://teampass.local/plugins/alertifyjs/css/themes/bootstrap.min.css)" />
    <!-- Toastr -->
    <link rel="stylesheet" href="[plugins/toastr/toastr.min.css](https://teampass.local/plugins/toastr/toastr.min.css)" />
    <!-- favicon -->
    <link rel="shortcut icon" type="image/png" href="https://teampass.local/favicon.ico"/>
    <!-- Custom style -->
    </head>





            <script language="javascript" type="text/javascript">
            <!--
                sessionStorage.clear();
                store.set(
                    "teampassSettings", {},
                    function(teampassSettings) {}
                );
                window.location.href = "index.php";
			-->
            </script><script type="text/javascript" src="https://teampass.local/includes/libraries/csrfp/js/csrfprotector.js"></script>

index.php :
image

Other blank page fixed:
User connected, go to https://teampass.domain.tld/ and if $_GET['page'] is missing, session is destroyed without refresh (leaves a blank page).

@corentin-soriano corentin-soriano changed the title BUGFIX - Uncomment redirect before exit to avoid blank page. BUGFIX - Fix blank pages. Jul 30, 2024
@nilsteampassnet nilsteampassnet merged commit e5b7ffa into nilsteampassnet:master Aug 25, 2024
2 of 4 checks passed
@nilsteampassnet
Copy link
Owner

Perfect!
I searched the root cause for a while with no success.
Really stupid mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants