My autologin script stopped working after upgrading to 3.2

Discussion in 'ISPConfig 3 Priority Support' started by webguyz, Sep 5, 2021 at 6:18 PM.

  1. webguyz

    webguyz Active Member HowtoForge Supporter

    Had a script that was working before to auto login a user and pw from a GET statement. But now does not work. Think its the this line

    src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js">
    Any thoughts on what changed? All I see is the text at the top of the screen "Connecting to Control panel"

    Code:
    <?php
    
    if($_GET['u']!=''){
    $username = $_GET['u'];
    $password = $_GET{'p'};
    }
    
    ?>
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js"></script>
    <div class="borderbox" style="text-align:center;"><br />Connecting to Control Panel...<br />9/5/2021 11:04:26 AM<br />
    <br /><br />
    </div>
    
    
    <script type="text/javascript">
    
    function weiterleitung() {
        $.ajax({
        type: "post",
        url: "https://dotcp.xxxxxxxxx.com:8080/login/index.php",
        data: "s_mod=login&s_pg=index&username=<?php echo $username; ?>&password=<?php echo $password; ?>",
        xhrFields: {withCredentials: true}
        }).done(function(){location.href="https://dotcp.xxxxxxxxx.com:8080/index.php"});
    
    }
    window.setTimeout("weiterleitung()", 1);
    
    
    </script> 
     
    ahrasis likes this.

Share This Page