Skip to content

Commit

Permalink
Change name of hook fields to try to stop lastpass etc auto-filling...
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMcC committed Nov 10, 2018
1 parent 67e4ff4 commit 4131fb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/routes/DomainRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ public function addRoutes($router, $displayEngine, $api) {

$router->post('/domain/([^/]+)/addhook(\.json)?', function($domain, $json = NULL) use ($router, $displayEngine, $api) {
$domain = urldecode($domain);

if (isset($_POST['hookurl'])) { $_POST['url'] = $_POST['hookurl']; unset($_POST['hookurl']); }
if (isset($_POST['hookpassword'])) { $_POST['password'] = $_POST['hookpassword']; unset($_POST['hookpassword']); }

$apiresult = $api->createDomainHook($domain, $_POST);
$result = ['unknown', 'unknown'];

Expand Down
4 changes: 2 additions & 2 deletions templates/default/domain.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@

<form method="post" action="{{ url("#{pathprepend}/domain/#{domain.domain}/addhook") }}" class="form-inline form-group" id="addhookform">
<input type="hidden" name="csrftoken" value="{{csrftoken}}">
<input class="form-control col-3 mb-2 mr-sm-2 mb-sm-0" type="text" name="url" value="" placeholder="Hook URL...">
<input class="form-control col-3 mb-2 mr-sm-2 mb-sm-0" type="text" name="password" value="" placeholder="Hook Password">
<input class="form-control col-3 mb-2 mr-sm-2 mb-sm-0" type="text" name="hookurl" value="" placeholder="Hook URL...">
<input class="form-control col-3 mb-2 mr-sm-2 mb-sm-0" type="text" name="hookpassword" value="" placeholder="Hook Password">
<button type="submit" class="btn btn-success" role="button">Add Domain Hook</button>
</form>

Expand Down

0 comments on commit 4131fb2

Please sign in to comment.