Skip to content

Commit

Permalink
Merge pull request from GHSA-8vqx-prq4-rqrq
Browse files Browse the repository at this point in the history
  • Loading branch information
ゴンドー committed Oct 26, 2023
1 parent 777ca98 commit 919c3cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/webroot/theme/admin-third/Users/admin/form.php
Expand Up @@ -173,8 +173,15 @@ class="helptext"><?php echo sprintf(__d('baser', 'ユーザーグループごと
<?php if ($this->request->data['Favorite']): ?>
<ul class="bca-list" data-bca-list-layout="horizon" id="DefaultFavorites">
<?php foreach($this->request->data['Favorite'] as $key => $favorite): ?>
<?php
// JavaScriptのリンクは除外
$link = $favorite['url'];
if (preg_match('/\A\s*?javascript\s*:/i', $link)) {
$link = '';
}
?>
<li class="bca-list__item">
<?php $this->BcBaser->link($favorite['name'], $favorite['url'], ['escape' => true]) ?>
<?php $this->BcBaser->link($favorite['name'], $link, ['escape' => true]) ?>
<?php echo $this->BcForm->input('Favorite.name.' . $key, ['type' => 'hidden', 'value' => $favorite['name'], 'class' => 'favorite-name']) ?>
<?php echo $this->BcForm->input('Favorite.url.' . $key, ['type' => 'hidden', 'value' => $favorite['url'], 'class' => 'favorite-url']) ?>
</li>
Expand Down
9 changes: 8 additions & 1 deletion lib/Baser/View/Users/admin/form.php
Expand Up @@ -165,8 +165,15 @@ class="helptext"> <?php echo sprintf(__d('baser', 'ユーザーグループご
<?php if ($this->request->data['Favorite']): ?>
<ul class="clearfix" id="DefaultFavorites">
<?php foreach($this->request->data['Favorite'] as $key => $favorite): ?>
<?php
// JavaScriptのリンクは除外
$link = $favorite['url'];
if (preg_match('/\A\s*?javascript\s*:/i', $link)) {
$link = '';
}
?>
<li style="float:left">
<?php $this->BcBaser->link(h($favorite['name']), $favorite['url']) ?>
<?php $this->BcBaser->link($favorite['name'], $link, ['escape' => true]) ?>
<?php echo $this->BcForm->input('Favorite.name.' . $key, ['type' => 'hidden', 'value' => $favorite['name'], 'class' => 'favorite-name']) ?>
<?php echo $this->BcForm->input('Favorite.url.' . $key, ['type' => 'hidden', 'value' => $favorite['url'], 'class' => 'favorite-url']) ?>
</li>
Expand Down

0 comments on commit 919c3cc

Please sign in to comment.