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
03ab2515
Commit
03ab2515
authored
Sep 28, 2013
by
Malcolm Scott
Committed by
Solly Ross
Feb 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement XVP auth
parent
df6b7d73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
rfb.js
include/rfb.js
+21
-2
No files found.
include/rfb.js
View file @
03ab2515
...
...
@@ -136,6 +136,7 @@ Util.conf_defaults(conf, that, defaults, [
[
'local_cursor'
,
'rw'
,
'bool'
,
false
,
'Request locally rendered cursor'
],
[
'shared'
,
'rw'
,
'bool'
,
true
,
'Request shared mode'
],
[
'view_only'
,
'rw'
,
'bool'
,
false
,
'Disable client mouse/keyboard'
],
[
'xvp_password_sep'
,
'rw'
,
'str'
,
'@'
,
'Separator for XVP password fields'
],
[
'disconnectTimeout'
,
'rw'
,
'int'
,
3
,
'Time (s) to wait for disconnection'
],
// UltraVNC repeater ID to connect to
...
...
@@ -630,7 +631,8 @@ init_msg = function() {
var
strlen
,
reason
,
length
,
sversion
,
cversion
,
repeaterID
,
i
,
types
,
num_types
,
challenge
,
response
,
bpp
,
depth
,
big_endian
,
red_max
,
green_max
,
blue_max
,
red_shift
,
green_shift
,
blue_shift
,
true_color
,
name_length
,
is_repeater
;
green_shift
,
blue_shift
,
true_color
,
name_length
,
is_repeater
,
xvp_sep
,
xvp_auth
,
xvp_auth_str
;
//Util.Debug("ws.rQ (" + ws.rQlen() + ") " + ws.rQslice(0));
switch
(
rfb_state
)
{
...
...
@@ -695,7 +697,7 @@ init_msg = function() {
types
=
ws
.
rQshiftBytes
(
num_types
);
Util
.
Debug
(
"Server security types: "
+
types
);
for
(
i
=
0
;
i
<
types
.
length
;
i
+=
1
)
{
if
((
types
[
i
]
>
rfb_auth_scheme
)
&&
(
types
[
i
]
<=
16
))
{
if
((
types
[
i
]
>
rfb_auth_scheme
)
&&
(
types
[
i
]
<=
16
||
types
[
i
]
==
22
))
{
rfb_auth_scheme
=
types
[
i
];
}
}
...
...
@@ -730,6 +732,23 @@ init_msg = function() {
}
// Fall through to ClientInitialisation
break
;
case
22
:
// XVP authentication
xvp_sep
=
conf
.
xvp_password_sep
;
xvp_auth
=
rfb_password
.
split
(
xvp_sep
);
if
(
xvp_auth
.
length
<
3
)
{
updateState
(
'password'
,
"XVP credentials required (user"
+
xvp_sep
+
"target"
+
xvp_sep
+
"password) -- got only "
+
rfb_password
);
conf
.
onPasswordRequired
(
that
);
return
;
}
xvp_auth_str
=
String
.
fromCharCode
(
xvp_auth
[
0
].
length
)
+
String
.
fromCharCode
(
xvp_auth
[
1
].
length
)
+
xvp_auth
[
0
]
+
xvp_auth
[
1
];
ws
.
send_string
(
xvp_auth_str
);
rfb_password
=
xvp_auth
.
slice
(
2
).
join
(
xvp_sep
);
rfb_auth_scheme
=
2
;
// Fall through to standard VNC authentication with remaining part of password
case
2
:
// VNC authentication
if
(
rfb_password
.
length
===
0
)
{
// Notify via both callbacks since it is kind of
...
...
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