Skip to content

VESTACP客戶端登入修正方式 #5

@wartw

Description

@wartw

VESTACP登入方式修改
public function managePanelLogin($server, $host) { $url = $this->getUrl($server); $token=base64_encode($host->host_pass); // dd($url); $input = ' <script>document.location.href="' . $url . '/login/?user='.$host->host_name.'&pass='.$token.'";</script>' ; $base64 = base64_encode($input); return ['type' => 'from_base64', 'content' => $base64]; }

VESTACP主機端修改(/usr/local/vesta/web/templates/login.html)

修改user input

<input value="<?php echo $_GET['user'];?>" tabindex="1" type="text" size="20px" style="width:240px;" name="user" class="vst-input">

修改password input

<input value="<?php echo base64_decode($_GET['pass']);?>" tabindex="2" type="password" size="20px" style="width:240px;" name="password" class="vst-input">

修改button input
<input id="login" tabindex="3" type="submit" value="<?php print __('Log in');?>" class="button">

</from>底下新增

<?php if($_GET['user'] !== null AND $_GET['pass'] !== null){echo '<script> setTimeout(function(){ var login = document.getElementById(\'login\'); login.click(); },100); </script>';}?>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions