Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
395a60a8
Commit
395a60a8
authored
2 years ago
by
Callum Prentice
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into DRTVWR-568
parents
aad3b32a
15b5dedb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/VIEWER_VERSION.txt
+1
-1
1 addition, 1 deletion
indra/newview/VIEWER_VERSION.txt
indra/newview/lllogininstance.cpp
+52
-34
52 additions, 34 deletions
indra/newview/lllogininstance.cpp
indra/newview/lllogininstance.h
+1
-0
1 addition, 0 deletions
indra/newview/lllogininstance.h
with
54 additions
and
35 deletions
indra/newview/VIEWER_VERSION.txt
+
1
−
1
View file @
395a60a8
6.6.
7
6.6.
8
This diff is collapsed.
Click to expand it.
indra/newview/lllogininstance.cpp
+
52
−
34
View file @
395a60a8
...
@@ -451,26 +451,8 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
...
@@ -451,26 +451,8 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
LLSD
args
(
llsd
::
map
(
"MESSAGE"
,
LLTrans
::
getString
(
response
[
"message_id"
])
));
LLSD
args
(
llsd
::
map
(
"MESSAGE"
,
LLTrans
::
getString
(
response
[
"message_id"
])
));
LLSD
payload
;
LLSD
payload
;
LLNotificationsUtil
::
add
(
"PromptMFAToken"
,
args
,
payload
,
[
=
](
LLSD
const
&
notif
,
LLSD
const
&
response
)
{
LLNotificationsUtil
::
add
(
"PromptMFAToken"
,
args
,
payload
,
bool
continue_clicked
=
response
[
"continue"
].
asBoolean
();
boost
::
bind
(
&
LLLoginInstance
::
handleMFAChallenge
,
this
,
_1
,
_2
));
std
::
string
token
=
response
[
"token"
].
asString
();
LL_DEBUGS
(
"LLLogin"
)
<<
"PromptMFAToken: response: "
<<
response
<<
" continue_clicked"
<<
continue_clicked
<<
LL_ENDL
;
// strip out whitespace - SL-17034/BUG-231938
token
=
boost
::
regex_replace
(
token
,
boost
::
regex
(
"
\\
s"
),
""
);
if
(
continue_clicked
&&
!
token
.
empty
())
{
LL_INFOS
(
"LLLogin"
)
<<
"PromptMFAToken: token submitted"
<<
LL_ENDL
;
// Set the request data to true and retry login.
mRequestData
[
"params"
][
"token"
]
=
token
;
reconnect
();
}
else
{
LL_INFOS
(
"LLLogin"
)
<<
"PromptMFAToken: no token, attemptComplete"
<<
LL_ENDL
;
attemptComplete
();
}
});
}
}
else
if
(
reason_response
==
"key"
else
if
(
reason_response
==
"key"
||
reason_response
==
"presence"
||
reason_response
==
"presence"
...
@@ -553,8 +535,21 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
...
@@ -553,8 +535,21 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
// Set the request data to true and retry login.
// Set the request data to true and retry login.
mRequestData
[
"params"
][
key
]
=
true
;
mRequestData
[
"params"
][
key
]
=
true
;
if
(
!
mRequestData
[
"params"
][
"token"
].
asString
().
empty
())
{
// SL-18511 this TOS failure happened while we are in the middle of an MFA challenge/response.
// the previously entered token is very likely expired, so prompt again
LLSD
args
(
llsd
::
map
(
"MESSAGE"
,
LLTrans
::
getString
(
"LoginFailedAuthenticationMFARequired"
)
));
LLSD
payload
;
LLNotificationsUtil
::
add
(
"PromptMFAToken"
,
args
,
payload
,
boost
::
bind
(
&
LLLoginInstance
::
handleMFAChallenge
,
this
,
_1
,
_2
));
}
else
{
reconnect
();
reconnect
();
}
}
}
else
else
{
{
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: attemptComplete"
<<
LL_ENDL
;
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: attemptComplete"
<<
LL_ENDL
;
...
@@ -566,6 +561,29 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
...
@@ -566,6 +561,29 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
return
true
;
return
true
;
}
}
bool
LLLoginInstance
::
handleMFAChallenge
(
LLSD
const
&
notif
,
LLSD
const
&
response
)
{
bool
continue_clicked
=
response
[
"continue"
].
asBoolean
();
std
::
string
token
=
response
[
"token"
].
asString
();
LL_DEBUGS
(
"LLLogin"
)
<<
"PromptMFAToken: response: "
<<
response
<<
" continue_clicked"
<<
continue_clicked
<<
LL_ENDL
;
// strip out whitespace - SL-17034/BUG-231938
token
=
boost
::
regex_replace
(
token
,
boost
::
regex
(
"
\\
s"
),
""
);
if
(
continue_clicked
&&
!
token
.
empty
())
{
LL_INFOS
(
"LLLogin"
)
<<
"PromptMFAToken: token submitted"
<<
LL_ENDL
;
// Set the request data to true and retry login.
mRequestData
[
"params"
][
"token"
]
=
token
;
reconnect
();
}
else
{
LL_INFOS
(
"LLLogin"
)
<<
"PromptMFAToken: no token, attemptComplete"
<<
LL_ENDL
;
attemptComplete
();
}
return
true
;
}
std
::
string
construct_start_string
()
std
::
string
construct_start_string
()
{
{
std
::
string
start
;
std
::
string
start
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lllogininstance.h
+
1
−
0
View file @
395a60a8
...
@@ -84,6 +84,7 @@ class LLLoginInstance : public LLSingleton<LLLoginInstance>
...
@@ -84,6 +84,7 @@ class LLLoginInstance : public LLSingleton<LLLoginInstance>
void
syncWithUpdater
(
ResponsePtr
resp
,
const
LLSD
&
notification
,
const
LLSD
&
response
);
void
syncWithUpdater
(
ResponsePtr
resp
,
const
LLSD
&
notification
,
const
LLSD
&
response
);
bool
handleTOSResponse
(
bool
v
,
const
std
::
string
&
key
);
bool
handleTOSResponse
(
bool
v
,
const
std
::
string
&
key
);
bool
handleMFAChallenge
(
LLSD
const
&
notif
,
LLSD
const
&
response
);
void
attemptComplete
()
{
mAttemptComplete
=
true
;
}
// In the future an event?
void
attemptComplete
()
{
mAttemptComplete
=
true
;
}
// In the future an event?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment