Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
phpipam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
vlbox
phpipam
Commits
16e7a94f
Unverified
Commit
16e7a94f
authored
Mar 5, 2023
by
Gary Allan
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: SQL injection in custom field enum/set types
Reported by Peng Zhou @zpbrent
parent
470a175f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
functions/classes/class.Admin.php
+2
-1
2 additions, 1 deletion
functions/classes/class.Admin.php
misc/CHANGELOG
+1
-0
1 addition, 0 deletions
misc/CHANGELOG
with
3 additions
and
1 deletion
functions/classes/class.Admin.php
+
2
−
1
View file @
16e7a94f
...
@@ -673,7 +673,7 @@ class Admin extends Common_functions {
...
@@ -673,7 +673,7 @@ class Admin extends Common_functions {
# set type definition and size of needed
# set type definition and size of needed
if
(
$field
[
'fieldType'
]
==
"bool"
||
$field
[
'fieldType'
]
==
"text"
||
$field
[
'fieldType'
]
==
"date"
||
$field
[
'fieldType'
]
==
"datetime"
)
{
$field
[
'ftype'
]
=
$field
[
'fieldType'
];
}
if
(
$field
[
'fieldType'
]
==
"bool"
||
$field
[
'fieldType'
]
==
"text"
||
$field
[
'fieldType'
]
==
"date"
||
$field
[
'fieldType'
]
==
"datetime"
)
{
$field
[
'ftype'
]
=
$field
[
'fieldType'
];
}
else
{
$field
[
'ftype'
]
=
$field
[
'fieldType'
]
.
"(
"
.
$field
[
'fieldSize'
]
.
"
)"
;
}
else
{
$field
[
'ftype'
]
=
$field
[
'fieldType'
]
.
"(
:enumset
)"
;
}
# default value null
# default value null
$field
[
'fieldDefault'
]
=
is_blank
(
$field
[
'fieldDefault'
])
?
NULL
:
$field
[
'fieldDefault'
];
$field
[
'fieldDefault'
]
=
is_blank
(
$field
[
'fieldDefault'
])
?
NULL
:
$field
[
'fieldDefault'
];
...
@@ -709,6 +709,7 @@ class Admin extends Common_functions {
...
@@ -709,6 +709,7 @@ class Admin extends Common_functions {
$params
=
array
();
$params
=
array
();
if
(
strpos
(
$query
,
":default"
)
>
0
)
$params
[
'default'
]
=
$field
[
'fieldDefault'
];
if
(
strpos
(
$query
,
":default"
)
>
0
)
$params
[
'default'
]
=
$field
[
'fieldDefault'
];
if
(
strpos
(
$query
,
":comment"
)
>
0
)
$params
[
'comment'
]
=
$field
[
'Comment'
];
if
(
strpos
(
$query
,
":comment"
)
>
0
)
$params
[
'comment'
]
=
$field
[
'Comment'
];
if
(
strpos
(
$query
,
":enumset"
)
>
0
)
$params
[
'enumset'
]
=
$field
[
'fieldSize'
];
# execute
# execute
try
{
$res
=
$this
->
Database
->
runQuery
(
$query
,
$params
);
}
try
{
$res
=
$this
->
Database
->
runQuery
(
$query
,
$params
);
}
...
...
This diff is collapsed.
Click to expand it.
misc/CHANGELOG
+
1
−
0
View file @
16e7a94f
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
Security Fixes:
Security Fixes:
----------------------------
----------------------------
+ SQL injection in custom field enum/set types;
+ XSS (reflected) in 'bw-calulator-result.php';
+ XSS (reflected) in 'bw-calulator-result.php';
+ XSS (reflected) by invalid email address response;
+ XSS (reflected) by invalid email address response;
+ XSS (reflected) by /app/tools/subnet-masks/popup.php (#3738);
+ XSS (reflected) by /app/tools/subnet-masks/popup.php (#3738);
...
...
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