Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
4c1e0564
Commit
4c1e0564
authored
Aug 31, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nicer prompts for SMP authentication.
Off-the-record is now functional and mostly done. Updates #11
parent
9add3e3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
converse.js
converse.js
+12
-4
No files found.
converse.js
View file @
4c1e0564
...
...
@@ -340,7 +340,10 @@
// used by OTR (off-the-record).
switch
(
type
)
{
case
'
question
'
:
this
.
otr
.
smpSecret
(
prompt
(
data
));
this
.
otr
.
smpSecret
(
prompt
(
__
(
'
Authentication request from %1$s
\n\n
'
+
'
Your buddy is attempting to verify your identity, by asking you the question below.
\n\n
'
+
'
%2$s
'
,
[
this
.
get
(
'
fullname
'
),
data
])));
break
;
case
'
trust
'
:
if
(
this
.
otr
.
trust
===
true
)
{
...
...
@@ -505,10 +508,10 @@
'
{[ if (otr_status !== "
'
+
UNENCRYPTED
+
'
") { ]}
'
+
'
<li><a class="start-otr" href="#">
'
+
__
(
'
Refresh encrypted conversation
'
)
+
'
</a></li>
'
+
'
<li><a class="end-otr" href="#">
'
+
__
(
'
End encrypted conversation
'
)
+
'
</a></li>
'
+
'
<li><a class="auth-otr" data-scheme="smp" href="#">
'
+
__
(
'
Verify with SMP
'
)
+
'
</a></li>
'
+
'
{[ } ]}
'
+
'
{[ if (otr_status === "
'
+
UNVERIFIED
+
'
") { ]}
'
+
'
<li><a class="auth-otr" data-scheme="fingerprint" href="#">
'
+
__
(
'
Verify with fingerprints
'
)
+
'
</a></li>
'
+
'
<li><a class="auth-otr" data-scheme="smp" href="#">
'
+
__
(
'
Verify with SMP
'
)
+
'
</a></li>
'
+
'
{[ } ]}
'
+
'
<li><a href="http://www.cypherpunks.ca/otr/help/3.2.0/levels.php" target="_blank">
'
+
__
(
"
What
\
's this?
"
)
+
'
</a></li>
'
+
'
</ul>
'
+
...
...
@@ -836,9 +839,14 @@
this
.
model
.
save
({
'
otr_status
'
:
UNVERIFIED
});
}
}
else
if
(
scheme
===
'
smp
'
)
{
alert
(
__
(
'
You will be prompted to provide a security question and then an answer to
'
+
'
that question.
\n\n
Your buddy will then be prompted the same question and if they
'
+
'
type the exact same answer (case sensitive), their identity will have been verified.
'
));
question
=
prompt
(
__
(
'
What is your security question?
'
));
answer
=
prompt
(
__
(
'
What is the answer to the security question?
'
));
this
.
model
.
otr
.
smpSecret
(
answer
,
question
);
if
(
question
)
{
answer
=
prompt
(
__
(
'
What is the answer to the security question?
'
));
this
.
model
.
otr
.
smpSecret
(
answer
,
question
);
}
}
else
{
this
.
showHelpMessages
([
__
(
'
Invalid authentication scheme provided
'
)],
'
error
'
);
}
...
...
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