Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
dfa8db8f
Commit
dfa8db8f
authored
Jun 26, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #7: security scheme list parsing.
Also, lower connect timeout to 2 seconds.
parent
c3785ae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
vnc.js
include/vnc.js
+13
-9
No files found.
include/vnc.js
View file @
dfa8db8f
...
@@ -64,7 +64,7 @@ true_color : false,
...
@@ -64,7 +64,7 @@ true_color : false,
b64encode
:
true
,
// false means UTF-8 on the wire
b64encode
:
true
,
// false means UTF-8 on the wire
//b64encode : false, // false means UTF-8 on the wire
//b64encode : false, // false means UTF-8 on the wire
connectTimeout
:
3
000
,
// time to wait for connection
connectTimeout
:
2
000
,
// time to wait for connection
// In preference order
// In preference order
...
@@ -306,9 +306,9 @@ mouse_arr : [],
...
@@ -306,9 +306,9 @@ mouse_arr : [],
init_msg
:
function
()
{
init_msg
:
function
()
{
//console.log(">> init_msg [RFB.state '" + RFB.state + "']");
//console.log(">> init_msg [RFB.state '" + RFB.state + "']");
var
RQ
=
RFB
.
RQ
,
strlen
,
reason
,
reason_len
,
var
RQ
=
RFB
.
RQ
,
strlen
,
reason
,
reason_len
,
sversion
,
cversion
,
sversion
,
cversion
,
types
,
num_types
,
challenge
,
response
,
i
,
types
,
num_types
,
challenge
,
response
,
bpp
,
depth
,
b
pp
,
depth
,
b
ig_endian
,
true_color
,
name_length
;
big_endian
,
true_color
,
name_length
;
//console.log("RQ (" + RQ.length + ") " + RQ);
//console.log("RQ (" + RQ.length + ") " + RQ);
switch
(
RFB
.
state
)
{
switch
(
RFB
.
state
)
{
...
@@ -350,15 +350,19 @@ init_msg: function () {
...
@@ -350,15 +350,19 @@ init_msg: function () {
"Disconnected: security failure: "
+
reason
);
"Disconnected: security failure: "
+
reason
);
return
;
return
;
}
}
RFB
.
auth_scheme
=
0
;
types
=
RQ
.
shiftBytes
(
num_types
);
types
=
RQ
.
shiftBytes
(
num_types
);
for
(
i
=
0
;
i
<
types
.
length
;
i
+=
1
)
{
RFB
.
auth_scheme
=
types
[
0
];
if
((
types
[
i
]
>
RFB
.
auth_scheme
)
&&
(
types
[
i
]
<
3
))
{
if
((
RFB
.
auth_scheme
!==
1
)
&&
(
RFB
.
auth_scheme
!==
2
))
{
RFB
.
auth_scheme
=
types
[
i
];
}
}
if
(
RFB
.
auth_scheme
===
0
)
{
RFB
.
updateState
(
'failed'
,
RFB
.
updateState
(
'failed'
,
"Disconnected:
invalid security types list
: "
+
types
);
"Disconnected:
unsupported security types
: "
+
types
);
return
;
return
;
}
}
RFB
.
send_array
([
RFB
.
auth_scheme
]);
RFB
.
send_array
([
RFB
.
auth_scheme
]);
}
else
{
}
else
{
if
(
RQ
.
length
<
4
)
{
if
(
RQ
.
length
<
4
)
{
...
...
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