Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Libraries
Commits
32f16e26
Commit
32f16e26
authored
Dec 18, 2012
by
Andrea Iacovitti
Browse files
Fix setting url userinfo in xmlhttprequest.
BUG: 275033 FIXED-IN: 4.9.5
parent
af93389d
Changes
1
Hide whitespace changes
Inline
Side-by-side
khtml/ecma/xmlhttprequest.cpp
View file @
32f16e26
...
...
@@ -922,15 +922,18 @@ JSValue *XMLHttpRequestProtoFunc::callAsFunction(ExecState *exec, JSObject *this
bool
async
=
true
;
if
(
args
.
size
()
>=
3
)
{
async
=
args
[
2
]
->
toBoolean
(
exec
);
async
=
args
[
2
]
->
toBoolean
(
exec
);
}
if
(
args
.
size
()
>=
4
)
{
url
.
setUser
(
args
[
3
]
->
toString
(
exec
).
qstring
());
}
if
(
args
.
size
()
>=
5
)
{
url
.
setPass
(
args
[
4
]
->
toString
(
exec
).
qstring
());
// Set url userinfo
if
(
args
.
size
()
>=
4
&&
!
args
[
3
]
->
isUndefinedOrNull
())
{
QString
user
=
args
[
3
]
->
toString
(
exec
).
qstring
();
if
(
!
user
.
isEmpty
())
{
url
.
setUser
(
user
);
if
(
args
.
size
()
>=
5
&&
!
args
[
4
]
->
isUndefinedOrNull
())
{
url
.
setPass
(
args
[
4
]
->
toString
(
exec
).
qstring
());
}
}
}
request
->
open
(
method
,
url
,
async
,
ec
);
...
...
Write
Preview
Supports
Markdown
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