diff --git a/app/modules/web/themes/material-blue/views/account/account.inc b/app/modules/web/themes/material-blue/views/account/account.inc
index 5ec50390..2462bf38 100644
--- a/app/modules/web/themes/material-blue/views/account/account.inc
+++ b/app/modules/web/themes/material-blue/views/account/account.inc
@@ -1,4 +1,27 @@
.
+ */
+
/**
* @var callable $_getvar
* @var ThemeIcons $icons
@@ -253,11 +276,8 @@ $showCustomFields = count($_getvar('customFields', 0)) > 0;
class="mdl-textfield__input mdl-color-text--indigo-400"
rows="3" id="notes"
name="notes"
- maxlength="5000" >
- getNotes(), ENT_QUOTES)
- : ''; ?>
-
+ maxlength="5000" >getNotes(), ENT_QUOTES) : ''; ?>
diff --git a/app/modules/web/themes/material-blue/views/account/search-rows.inc b/app/modules/web/themes/material-blue/views/account/search-rows.inc
index 8b36c978..b3ccbc9a 100644
--- a/app/modules/web/themes/material-blue/views/account/search-rows.inc
+++ b/app/modules/web/themes/material-blue/views/account/search-rows.inc
@@ -1,4 +1,27 @@
.
+ */
+
/**
* @var ThemeIcons $icons
* @var callable $_getvar
@@ -102,9 +125,12 @@ $favoriteRouteOff = $_getvar('favoriteRouteOff');
isUrlIslink()): ?>
-
+ title="getUrl(), ENT_QUOTES)
+ ); ?>">
getShortUrl(), ENT_QUOTES); ?>
diff --git a/lib/SP/Html/Html.php b/lib/SP/Html/Html.php
index 3c4ea017..6684bf80 100644
--- a/lib/SP/Html/Html.php
+++ b/lib/SP/Html/Html.php
@@ -1,10 +1,10 @@
.
+ * along with sysPass. If not, see
.
*/
namespace SP\Html;
@@ -176,4 +176,19 @@ final class Html
// Replace tags, then new lines, tabs and return chars, and then 2 or more spaces
return trim(preg_replace(['/<[^>]*>/', '/[\n\t\r]+/', '/\s{2,}/'], ' ', $text));
}
+
+ /**
+ * @param string $url
+ *
+ * @return string
+ */
+ public static function getSafeUrl(string $url): string
+ {
+ if (preg_match('#^((?:https?|ftp|ssh|rdp)://[\w._-]+/)(.*)#', $url, $urlParts)
+ && count($urlParts) === 3) {
+ return $urlParts[1].urlencode($urlParts[2]);
+ }
+
+ return urlencode($url);
+ }
}
diff --git a/lib/SP/Services/Account/AccountSearchItem.php b/lib/SP/Services/Account/AccountSearchItem.php
index 674bd71e..ba1ce227 100644
--- a/lib/SP/Services/Account/AccountSearchItem.php
+++ b/lib/SP/Services/Account/AccountSearchItem.php
@@ -1,10 +1,10 @@
.
+ * along with sysPass. If not, see
.
*/
namespace SP\Services\Account;
@@ -202,7 +202,7 @@ final class AccountSearchItem
*/
public function getShortUrl()
{
- return Html::truncate($this->accountSearchVData->getUrl(), $this->textMaxLength);
+ return Html::truncate($this->getSafeUrl(), $this->textMaxLength);
}
/**
@@ -210,7 +210,15 @@ final class AccountSearchItem
*/
public function isUrlIslink()
{
- return preg_match('#^\w+://#i', $this->accountSearchVData->getUrl());
+ return preg_match('#^\w+://#', $this->accountSearchVData->getUrl());
+ }
+
+ /**
+ * @return string
+ */
+ public function getSafeUrl()
+ {
+ return Html::getSafeUrl($this->accountSearchVData->getUrl());
}
/**
diff --git a/lib/SP/Services/Install/Installer.php b/lib/SP/Services/Install/Installer.php
index e413dd5e..bf3ab4e2 100644
--- a/lib/SP/Services/Install/Installer.php
+++ b/lib/SP/Services/Install/Installer.php
@@ -1,11 +1,11 @@
.
+ * along with sysPass. If not, see
.
*/
namespace SP\Services\Install;
@@ -60,9 +60,9 @@ final class Installer extends Service
/**
* sysPass' version and build number
*/
- const VERSION = [3, 2, 5];
+ const VERSION = [3, 2, 6];
const VERSION_TEXT = '3.2';
- const BUILD = 22060401;
+ const BUILD = 22061601;
/**
* @var DatabaseSetupInterface