Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
smradius
smradius
Commits
94a0de0a
Commit
94a0de0a
authored
May 16, 2019
by
Nigel Kukard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the attribute sanitization into the right place
parent
f24d760c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/smradius/attributes.pm
lib/smradius/attributes.pm
+4
-4
No files found.
lib/smradius/attributes.pm
View file @
94a0de0a
...
...
@@ -843,16 +843,16 @@ sub processConditional
$res
=
1
;
}
# Sanitize the output
$attribStr
=~
s/^\s*//
;
$attribStr
=~
s/\s*$//
;
$server
->
log
(
LOG_DEBUG
,"
[ATTRIBUTES] - Evaluated to '
$res
' returning '
"
.
(
defined
(
$attribStr
)
?
$attribStr
:
"
-undef-
")
.
"
'
");
# Loop with attributes:
# We only get here if $res is set to 1 above, if its only a conditional with no onTrue & onFalse
# Then attribStr will be unef
if
(
$res
&&
defined
(
$attribStr
))
{
# Sanitize the output
$attribStr
=~
s/^\s*//
;
$attribStr
=~
s/\s*$//
;
foreach
my
$rawAttr
(
split
(
/;/
,
$attribStr
))
{
# Split off attribute string: name = value
my
(
$attrName
,
$attrVal
)
=
(
$rawAttr
=~
/^\s*([^=]+)=\s*(.*)/
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment