Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion db/cats_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ insert into `module_schema`(`module_schema_id`,`name`,`version`) values (9,'ext
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (10,'graphs',0);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (11,'home',0);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (12,'import',0);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (13,'install',370);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (13,'install',371);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (14,'joborders',0);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (15,'lists',0);
insert into `module_schema`(`module_schema_id`,`name`,`version`) values (16,'login',0);
Expand Down
4 changes: 2 additions & 2 deletions modules/calendar/Calendar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<select id="type" name="type" class="inputbox" style="width: 150px;">
<option value="">(Select a Type)</option>
<?php foreach ($this->calendarEventTypes as $type): ?>
<option value="<?php echo($type['typeID']); ?>"><?php echo($type['description']); ?></option>
<option value="<?php echo($type['typeID']); ?>"><?php $this->_($type['description']); ?></option>
<?php endforeach; ?>
</select>&nbsp;*
</td>
Expand Down Expand Up @@ -217,7 +217,7 @@
<select id="typeEdit" name="type" class="inputbox" style="width: 150px;">
<option value="">(Select a Type)</option>
<?php foreach ($this->calendarEventTypes as $type): ?>
<option value="<?php echo($type['typeID']); ?>"><?php echo($type['description']); ?></option>
<option value="<?php echo($type['typeID']); ?>"><?php $this->_($type['description']); ?></option>
<?php endforeach; ?>
</select>&nbsp;*
</td>
Expand Down
14 changes: 7 additions & 7 deletions modules/calendar/CalendarUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ private function onAddEvent()

$publicEntry = $this->isChecked('publicEntry', $_POST);
$reminderEnabled = $this->isChecked('reminderToggle', $_POST);
$description = $this->getSanitisedInput('description', $_POST);
$title = $this->getSanitisedInput('title', $_POST);
$reminderEmail = $this->getSanitisedInput('sendEmail', $_POST);
$reminderTime = $this->getSanitisedInput('reminderTime', $_POST);
$description = $this->getTrimmedInput('description', $_POST);
$title = $this->getTrimmedInput('title', $_POST);
$reminderEmail = $this->getTrimmedInput('sendEmail', $_POST);
$reminderTime = $this->getTrimmedInput('reminderTime', $_POST);

// FIXME: Reminder time must be an integer!

Expand Down Expand Up @@ -595,9 +595,9 @@ private function onEditEvent()
$publicEntry = $this->isChecked('publicEntry', $_POST);
$reminderEnabled = $this->isChecked('reminderToggle', $_POST);

$description = $this->getSanitisedInput('description', $_POST);
$title = $this->getSanitisedInput('title', $_POST);
$reminderEmail = $this->getSanitisedInput('sendEmail', $_POST);
$description = $this->getTrimmedInput('description', $_POST);
$title = $this->getTrimmedInput('title', $_POST);
$reminderEmail = $this->getTrimmedInput('sendEmail', $_POST);
$reminderTime = $this->getTrimmedInput('reminderTime', $_POST);

// FIXME: Reminder time must be an integer!
Expand Down
88 changes: 44 additions & 44 deletions modules/candidates/CandidatesUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -986,28 +986,28 @@ public function checkParsingFunctions()

// Retain all field data since this isn't done over AJAX (yet)
$fields = array(
'firstName' => $this->getSanitisedInput('firstName', $_POST),
'middleName' => $this->getSanitisedInput('middleName', $_POST),
'lastName' => $this->getSanitisedInput('lastName', $_POST),
'email1' => $this->getSanitisedInput('email1', $_POST),
'email2' => $this->getSanitisedInput('email2', $_POST),
'phoneHome' => $this->getSanitisedInput('phoneHome', $_POST),
'phoneCell' => $this->getSanitisedInput('phoneCell', $_POST),
'phoneWork' => $this->getSanitisedInput('phoneWork', $_POST),
'address' => $this->getSanitisedInput('address', $_POST),
'address2' => $this->getSanitisedInput('address2', $_POST),
'city' => $this->getSanitisedInput('city', $_POST),
'state' => $this->getSanitisedInput('state', $_POST),
'zip' => $this->getSanitisedInput('zip', $_POST),
'firstName' => $this->getTrimmedInput('firstName', $_POST),
'middleName' => $this->getTrimmedInput('middleName', $_POST),
'lastName' => $this->getTrimmedInput('lastName', $_POST),
'email1' => $this->getTrimmedInput('email1', $_POST),
'email2' => $this->getTrimmedInput('email2', $_POST),
'phoneHome' => $this->getTrimmedInput('phoneHome', $_POST),
'phoneCell' => $this->getTrimmedInput('phoneCell', $_POST),
'phoneWork' => $this->getTrimmedInput('phoneWork', $_POST),
'address' => $this->getTrimmedInput('address', $_POST),
'address2' => $this->getTrimmedInput('address2', $_POST),
'city' => $this->getTrimmedInput('city', $_POST),
'state' => $this->getTrimmedInput('state', $_POST),
'zip' => $this->getTrimmedInput('zip', $_POST),
'source' => $this->getTrimmedInput('source', $_POST),
'keySkills' => $this->getSanitisedInput('keySkills', $_POST),
'currentEmployer' => $this->getSanitisedInput('currentEmployer', $_POST),
'currentPay' => $this->getSanitisedInput('currentPay', $_POST),
'desiredPay' => $this->getSanitisedInput('desiredPay', $_POST),
'notes' => $this->getSanitisedInput('notes', $_POST),
'canRelocate' => $this->getSanitisedInput('canRelocate', $_POST),
'webSite' => $this->getSanitisedInput('webSite', $_POST),
'bestTimeToCall' => $this->getSanitisedInput('bestTimeToCall', $_POST),
'keySkills' => $this->getTrimmedInput('keySkills', $_POST),
'currentEmployer' => $this->getTrimmedInput('currentEmployer', $_POST),
'currentPay' => $this->getTrimmedInput('currentPay', $_POST),
'desiredPay' => $this->getTrimmedInput('desiredPay', $_POST),
'notes' => $this->getTrimmedInput('notes', $_POST),
'canRelocate' => $this->getTrimmedInput('canRelocate', $_POST),
'webSite' => $this->getTrimmedInput('webSite', $_POST),
'bestTimeToCall' => $this->getTrimmedInput('bestTimeToCall', $_POST),
'gender' => $this->getTrimmedInput('gender', $_POST),
'race' => $this->getTrimmedInput('race', $_POST),
'veteran' => $this->getTrimmedInput('veteran', $_POST),
Expand Down Expand Up @@ -1287,39 +1287,39 @@ private function onEdit()
}

$formattedPhoneHome = StringUtility::extractPhoneNumber(
$this->getSanitisedInput('phoneHome', $_POST)
$this->getTrimmedInput('phoneHome', $_POST)
);
if (!empty($formattedPhoneHome))
{
$phoneHome = $formattedPhoneHome;
}
else
{
$phoneHome = $this->getSanitisedInput('phoneHome', $_POST);
$phoneHome = $this->getTrimmedInput('phoneHome', $_POST);
}

$formattedPhoneCell = StringUtility::extractPhoneNumber(
$this->getSanitisedInput('phoneCell', $_POST)
$this->getTrimmedInput('phoneCell', $_POST)
);
if (!empty($formattedPhoneCell))
{
$phoneCell = $formattedPhoneCell;
}
else
{
$phoneCell = $this->getSanitisedInput('phoneCell', $_POST);
$phoneCell = $this->getTrimmedInput('phoneCell', $_POST);
}

$formattedPhoneWork = StringUtility::extractPhoneNumber(
$this->getSanitisedInput('phoneWork', $_POST)
$this->getTrimmedInput('phoneWork', $_POST)
);
if (!empty($formattedPhoneWork))
{
$phoneWork = $formattedPhoneWork;
}
else
{
$phoneWork = $this->getSanitisedInput('phoneWork', $_POST);
$phoneWork = $this->getTrimmedInput('phoneWork', $_POST);
}

$candidateID = $_POST['candidateID'];
Expand Down Expand Up @@ -1392,23 +1392,23 @@ private function onEdit()
}

$isActive = $this->isChecked('isActive', $_POST);
$firstName = $this->getSanitisedInput('firstName', $_POST);
$middleName = $this->getSanitisedInput('middleName', $_POST);
$lastName = $this->getSanitisedInput('lastName', $_POST);
$email1 = $this->getSanitisedInput('email1', $_POST);
$email2 = $this->getSanitisedInput('email2', $_POST);
$address = $this->getSanitisedInput('address', $_POST);
$address2 = $this->getSanitisedInput('address2', $_POST);
$city = $this->getSanitisedInput('city', $_POST);
$state = $this->getSanitisedInput('state', $_POST);
$zip = $this->getSanitisedInput('zip', $_POST);
$source = $this->getSanitisedInput('source', $_POST);
$keySkills = $this->getSanitisedInput('keySkills', $_POST);
$currentEmployer = $this->getSanitisedInput('currentEmployer', $_POST);
$currentPay = $this->getSanitisedInput('currentPay', $_POST);
$desiredPay = $this->getSanitisedInput('desiredPay', $_POST);
$notes = $this->getSanitisedInput('notes', $_POST);
$webSite = $this->getSanitisedInput('webSite', $_POST);
$firstName = $this->getTrimmedInput('firstName', $_POST);
$middleName = $this->getTrimmedInput('middleName', $_POST);
$lastName = $this->getTrimmedInput('lastName', $_POST);
$email1 = $this->getTrimmedInput('email1', $_POST);
$email2 = $this->getTrimmedInput('email2', $_POST);
$address = $this->getTrimmedInput('address', $_POST);
$address2 = $this->getTrimmedInput('address2', $_POST);
$city = $this->getTrimmedInput('city', $_POST);
$state = $this->getTrimmedInput('state', $_POST);
$zip = $this->getTrimmedInput('zip', $_POST);
$source = $this->getTrimmedInput('source', $_POST);
$keySkills = $this->getTrimmedInput('keySkills', $_POST);
$currentEmployer = $this->getTrimmedInput('currentEmployer', $_POST);
$currentPay = $this->getTrimmedInput('currentPay', $_POST);
$desiredPay = $this->getTrimmedInput('desiredPay', $_POST);
$notes = $this->getTrimmedInput('notes', $_POST);
$webSite = $this->getTrimmedInput('webSite', $_POST);
$bestTimeToCall = $this->getTrimmedInput('bestTimeToCall', $_POST);
$gender = $this->getTrimmedInput('gender', $_POST);
$race = $this->getTrimmedInput('race', $_POST);
Expand Down
6 changes: 3 additions & 3 deletions modules/candidates/Show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use OpenCATS\UI\CandidateQuickActionMenu;
use OpenCATS\UI\CandidateDuplicateQuickActionMenu;
?>
<?php if ($this->isPopup): ?>
<?php TemplateUtility::printHeader('Candidate - '.$this->data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'modules/candidates/quickAction-candidates.js')); ?>
<?php TemplateUtility::printHeader('Candidate - ' . htmlspecialchars($this->data['firstName'], ENT_QUOTES, HTML_ENCODING) . ' ' . htmlspecialchars($this->data['lastName'], ENT_QUOTES, HTML_ENCODING), array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'modules/candidates/quickAction-candidates.js')); ?>
<?php else: ?>
<?php TemplateUtility::printHeader('Candidate - '.$this->data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'modules/candidates/quickAction-candidates.js', 'modules/candidates/quickAction-duplicates.js')); ?>
<?php TemplateUtility::printHeader('Candidate - ' . htmlspecialchars($this->data['firstName'], ENT_QUOTES, HTML_ENCODING) . ' ' . htmlspecialchars($this->data['lastName'], ENT_QUOTES, HTML_ENCODING), array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'modules/candidates/quickAction-candidates.js', 'modules/candidates/quickAction-duplicates.js')); ?>

<?php TemplateUtility::printHeaderBlock(); ?>
<?php TemplateUtility::printTabs($this->active); ?>
Expand Down Expand Up @@ -614,7 +614,7 @@ use OpenCATS\UI\CandidateDuplicateQuickActionMenu;
<?php foreach($this->lists as $rowNumber => $list): ?>
<tr class="<?php TemplateUtility::printAlternatingRowClass($rowNumber); ?>">
<td>
<a href="index.php?m=lists&a=showList&savedListID=<?php echo $list['listID']; ?>"><?php echo $list['name']; ?></a>
<a href="index.php?m=lists&a=showList&savedListID=<?php echo $list['listID']; ?>"><?php $this->_($list['name']); ?></a>
</td>
</tr>
<?php endforeach; ?>
Expand Down
3 changes: 2 additions & 1 deletion modules/careers/CareersUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,8 @@ private function onApplyToJobOrder($siteID, $candidateID = false)
return;
}

/* funciton getSanitisedInput used to fix XSS vuln in public portal */
// NOTE: Careers Portal renders these values into HTML without consistent output escaping.
// TODO (security/xss-hardening): Escape attributes/textarea/title consistently, then switch to getTrimmedInput().
$lastName = $this->getSanitisedInput('lastName', $_POST);
$middleName = $this->getSanitisedInput('middleName', $_POST);
$firstName = $this->getSanitisedInput('firstName', $_POST);
Expand Down
Loading
Loading