Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lightbox2
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
lightbox2
Commits
d2b2b139
Commit
d2b2b139
authored
Oct 11, 2018
by
Oleh Vehera
Browse files
Options
Downloads
Patches
Plain Diff
Security fix. See Lightbox2 - Moderately critical - Cross Site Scripting - SA-
CONTRIB-2018
-063
parent
f692aab1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lightbox2_handler_field_lightbox2.inc
+6
-1
6 additions, 1 deletion
lightbox2_handler_field_lightbox2.inc
with
6 additions
and
1 deletion
lightbox2_handler_field_lightbox2.inc
+
6
−
1
View file @
d2b2b139
...
...
@@ -154,7 +154,12 @@ class lightbox2_handler_field_lightbox2 extends views_handler_field {
// div is hidden it won't show up as a lightbox. We also specify a group
// in the rel attribute in order to link the whole View together for paging.
$group_name
=
!
empty
(
$this
->
options
[
'custom_group'
])
?
$this
->
options
[
'custom_group'
]
:
(
$this
->
options
[
'rel_group'
]
?
'lightbox-popup-'
.
$this
->
view
->
name
.
'-'
.
implode
(
'/'
,
$this
->
view
->
args
)
:
''
);
return
"<a href='
$link
#lightbox-popup-
{
$i
}
' rel='lightmodal[
{
$group_name
}
|width:"
.
(
$this
->
options
[
'width'
]
?
$this
->
options
[
'width'
]
:
'600px'
)
.
';height:'
.
(
$this
->
options
[
'height'
]
?
$this
->
options
[
'height'
]
:
'600px'
)
.
"]["
.
$caption
.
"]'>"
.
$tokens
[
"[
{
$this
->
options
[
'trigger_field'
]
}
]"
]
.
"</a>
$group_name
=
check_plain
(
$group_name
);
$width
=
$this
->
options
[
'width'
]
?
check_plain
(
$this
->
options
[
'width'
])
:
'600px'
;
$height
=
$this
->
options
[
'height'
]
?
check_plain
(
$this
->
options
[
'height'
])
:
'600px'
;
$trigger_field
=
filter_xss_admin
(
$this
->
options
[
'trigger_field'
]);
return
"<a href='
$link
#lightbox-popup-
{
$i
}
' rel='lightmodal[
{
$group_name
}
|width:"
.
$width
.
';height:'
.
$height
.
"]["
.
$caption
.
"]'>"
.
$tokens
[
"[
{
$trigger_field
}
]"
]
.
"</a>
<div style='display: none;'><div id='lightbox-popup-
{
$i
}
' class='lightbox-popup'>
$popup
</div></div>"
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment