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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Multiple HTML Injection Vulnerabilities #16

Merged
merged 1 commit into from
Mar 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions forms/customer_form.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<fieldset>
<div class="form-group">
<label for="f_name">First Name *</label>
<input type="text" name="f_name" value="<?php echo $edit ? $customer['f_name'] : ''; ?>" placeholder="First Name" class="form-control" required="required" id = "f_name" >
<input type="text" name="f_name" value="<?php echo htmlspecialchars($edit ? $customer['f_name'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="First Name" class="form-control" required="required" id = "f_name" >
</div>

<div class="form-group">
<label for="l_name">Last name *</label>
<input type="text" name="l_name" value="<?php echo $edit ? $customer['l_name'] : ''; ?>" placeholder="Last Name" class="form-control" required="required" id="l_name">
<input type="text" name="l_name" value="<?php echo htmlspecialchars($edit ? $customer['l_name'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="Last Name" class="form-control" required="required" id="l_name">
</div>

<div class="form-group">
Expand Down Expand Up @@ -45,21 +45,21 @@
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" value="<?php echo $edit ? $customer['email'] : ''; ?>" placeholder="E-Mail Address" class="form-control" id="email">
<input type="email" name="email" value="<?php echo htmlspecialchars($edit ? $customer['email'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="E-Mail Address" class="form-control" id="email">
</div>

<div class="form-group">
<label for="phone">Phone</label>
<input name="phone" value="<?php echo $edit ? $customer['phone'] : ''; ?>" placeholder="987654321" class="form-control" type="text" id="phone">
<input name="phone" value="<?php echo htmlspecialchars($edit ? $customer['phone'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="987654321" class="form-control" type="text" id="phone">
</div>

<div class="form-group">
<label>Date of birth</label>
<input name="date_of_birth" value="<?php echo $edit ? $customer['date_of_birth'] : ''; ?>" placeholder="Birth date" class="form-control" type="date">
<input name="date_of_birth" value="<?php echo htmlspecialchars($edit ? $customer['date_of_birth'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="Birth date" class="form-control" type="date">
</div>

<div class="form-group text-center">
<label></label>
<button type="submit" class="btn btn-warning" >Save <span class="glyphicon glyphicon-send"></span></button>
</div>
</fieldset>
</fieldset>