Skip to content

Commit

Permalink
Merge pull request #1668 from nuxsmin/v3.2
Browse files Browse the repository at this point in the history
v3.2.2
  • Loading branch information
nuxsmin authored Mar 13, 2021
2 parents 4c3312d + 861ce46 commit 5882699
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions lib/SP/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,18 @@ public function getForwardedFor()
$forwarded = $this->headers->get('HTTP_FORWARDED');

if ($forwarded !== null &&
preg_match_all('/(?:for=([\w.:]+))|(?:for="\[([\w.:]+)\]")/i',
$forwarded, $matches)
preg_match_all(
'/(?:for=([\w.:]+))|(?:for="\[([\w.:]+)\]")/i',
$forwarded,
$matches)
) {
return array_filter(array_merge($matches[1], $matches[2]), function ($value) {
return !empty($value);
});
}

// eg: X-Forwarded-For: 192.0.2.43, 2001:db8:cafe::17
$xForwarded = $this->headers->exists('HTTP_X_FORWARDED_FOR');
$xForwarded = $this->headers->get('HTTP_X_FORWARDED_FOR');

if ($xForwarded !== null) {
$matches = preg_split('/(?<=[\w])+,\s?/i',
Expand Down
4 changes: 2 additions & 2 deletions lib/SP/Services/Install/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ final class Installer extends Service
/**
* sysPass' version and build number
*/
const VERSION = [3, 2, 1];
const VERSION = [3, 2, 2];
const VERSION_TEXT = '3.2';
const BUILD = 21011601;
const BUILD = 21031301;

/**
* @var DatabaseSetupInterface
Expand Down
4 changes: 3 additions & 1 deletion public/js/app-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ sysPass.Util = function (log) {
}
}

if (password.config.complexity.uppercase) {
if (password.config.complexity.chars
&& password.config.complexity.uppercase
) {
const chars = password.config.charset.char.toUpperCase();
const res = inPassArray.some(
function (el) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/app-util.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5882699

Please sign in to comment.