Fix sending profile form (#2389)

Credentials no longer suggested in the Search box in 'Sending Profiles'
pull/1894/merge
Mark Steward 2022-02-07 16:12:55 +00:00 committed by GitHub
parent a6627dfc6b
commit 1f95efcb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 27 deletions

View File

@ -307,7 +307,7 @@ $(document).ready(function () {
dismissSendTestEmailModal() dismissSendTestEmailModal()
}) })
// Code to deal with custom email headers // Code to deal with custom email headers
$("#headersForm").on('submit', function () { $("#addCustomHeader").on('click', function () {
headerKey = $("#headerKey").val(); headerKey = $("#headerKey").val();
headerValue = $("#headerValue").val(); headerValue = $("#headerValue").val();
@ -316,7 +316,8 @@ $(document).ready(function () {
} }
addCustomHeader(headerKey, headerValue); addCustomHeader(headerKey, headerValue);
// Reset user input. // Reset user input.
$("#headersForm>div>input").val(''); $("#headerKey").val('');
$("#headerValue").val('');
$("#headerKey").focus(); $("#headerKey").focus();
return false; return false;
}); });

View File

@ -44,27 +44,29 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row" id="modal.flashes"></div> <div class="row" id="modal.flashes"></div>
<div class="form-group"> <form>
<label class="control-label" for="name">Name:</label> <div class="form-group">
<input type="text" class="form-control" placeholder="Profile name" id="name" autofocus /> <label class="control-label" for="name">Name:</label>
<label class="control-label" for="interface_type">Interface Type:</label> <input type="text" class="form-control" placeholder="Profile name" id="name" autofocus />
<input type="text" class="form-control" value="SMTP" id="interface_type" disabled /> <label class="control-label" for="interface_type">Interface Type:</label>
<label class="control-label" for="from">From:</label> <input type="text" class="form-control" value="SMTP" id="interface_type" disabled />
<input type="text" class="form-control" placeholder="First Last <test@example.com>" id="from" <label class="control-label" for="from">From:</label>
required /> <input type="text" class="form-control" placeholder="First Last <test@example.com>" id="from"
<label class="control-label" for="host">Host:</label> required />
<input type="text" class="form-control" placeholder="smtp.example.com:25" id="host" required /> <label class="control-label" for="host">Host:</label>
<label class="control-label" for="username">Username:</label> <input type="text" class="form-control" placeholder="smtp.example.com:25" id="host" required />
<input type="text" class="form-control" placeholder="Username" id="username" /> <label class="control-label" for="username">Username:</label>
<label class="control-label" for="password">Password:</label> <input type="text" class="form-control" placeholder="Username" id="username" />
<input type="password" class="form-control" placeholder="Password" id="password" /> <label class="control-label" for="password">Password:</label>
<div class="checkbox checkbox-primary"> <input type="password" class="form-control" placeholder="Password" id="password" />
<input id="ignore_cert_errors" type="checkbox" checked> <div class="checkbox checkbox-primary">
<label for="ignore_cert_errors">Ignore Certificate Errors <i class="fa fa-question-circle" <input id="ignore_cert_errors" type="checkbox" checked>
data-toggle="tooltip" data-placement="right" title="Ignore common certificate errors such as self-signed certs (exposes you to MiTM attacks - use carefully!)"></i></label> <label for="ignore_cert_errors">Ignore Certificate Errors <i class="fa fa-question-circle"
data-toggle="tooltip" data-placement="right" title="Ignore common certificate errors such as self-signed certs (exposes you to MiTM attacks - use carefully!)"></i></label>
</div>
</div> </div>
<label class="control-label" for="headersForm">Email Headers:</label> <fieldset class="form-group">
<form id="headersForm"> <label class="control-label input-group">Email Headers:</label>
<div class="col-md-4"> <div class="col-md-4">
<input type="text" class="form-control" name="headerKey" id="headerKey" placeholder="X-Custom-Header"> <input type="text" class="form-control" name="headerKey" id="headerKey" placeholder="X-Custom-Header">
</div> </div>
@ -72,12 +74,10 @@
<input type="text" class="form-control" name="headerValue" id="headerValue" placeholder='{{"{{"}}.URL{{"}}"}}-gophish'> <input type="text" class="form-control" name="headerValue" id="headerValue" placeholder='{{"{{"}}.URL{{"}}"}}-gophish'>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<button class="btn btn-danger btn-headers" type="submit"><i class="fa fa-plus"></i> Add <button id="addCustomHeader" class="btn btn-danger btn-headers" type="button"><i class="fa fa-plus"></i> Add
Custom Header</button> Custom Header</button>
</div> </div>
</form> </fieldset>
<br />
<br />
<table id="headersTable" class="table table-hover table-striped table-condensed"> <table id="headersTable" class="table table-hover table-striped table-condensed">
<thead> <thead>
<tr> <tr>
@ -91,7 +91,7 @@
</table> </table>
<button type="button" data-toggle="modal" data-backdrop="static" data-target="#sendTestEmailModal" <button type="button" data-toggle="modal" data-backdrop="static" data-target="#sendTestEmailModal"
class="btn btn-primary"><i class="fa fa-envelope"></i> Send Test Email</button> class="btn btn-primary"><i class="fa fa-envelope"></i> Send Test Email</button>
</div> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-default" onclick="dismiss()">Cancel</button> <button type="button" data-dismiss="modal" class="btn btn-default" onclick="dismiss()">Cancel</button>