Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yggdrasil
Yggdrasil
Commits
d9879194
Commit
d9879194
authored
Nov 23, 2022
by
Rye Mutt
🍞
Browse files
Merge branch 'main' of
https://github.com/secondlife/viewer
parents
9382a95c
c8f08f23
Changes
3
Hide whitespace changes
Inline
Side-by-side
indra/newview/VIEWER_VERSION.txt
View file @
d9879194
6.6.
7
6.6.
8
indra/newview/lllogininstance.cpp
View file @
d9879194
...
...
@@ -451,26 +451,8 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
LLSD
args
(
llsd
::
map
(
"MESSAGE"
,
LLTrans
::
getString
(
response
[
"message_id"
])
));
LLSD
payload
;
LLNotificationsUtil
::
add
(
"PromptMFAToken"
,
args
,
payload
,
[
=
](
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
();
}
});
LLNotificationsUtil
::
add
(
"PromptMFAToken"
,
args
,
payload
,
boost
::
bind
(
&
LLLoginInstance
::
handleMFAChallenge
,
this
,
_1
,
_2
));
}
else
if
(
reason_response
==
"key"
||
reason_response
==
"presence"
...
...
@@ -547,23 +529,59 @@ void LLLoginInstance::handleIndeterminate(const LLSD& event)
bool
LLLoginInstance
::
handleTOSResponse
(
bool
accepted
,
const
std
::
string
&
key
)
{
if
(
accepted
)
{
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: accepted"
<<
LL_ENDL
;
if
(
accepted
)
{
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: accepted
"
<<
LL_ENDL
;
// Set the request data to true and retry login.
mRequestData
[
"params"
][
key
]
=
true
;
reconnect
();
}
else
{
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: attemptComplete"
<<
LL_ENDL
;
// Set the request data to true and retry login.
mRequestData
[
"params"
][
key
]
=
true
;
attemptComplete
();
}
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
();
}
}
else
{
LL_INFOS
(
"LLLogin"
)
<<
"LLLoginInstance::handleTOSResponse: attemptComplete"
<<
LL_ENDL
;
attemptComplete
();
}
LLEventPumps
::
instance
().
obtain
(
TOS_REPLY_PUMP
).
stopListening
(
TOS_LISTENER_NAME
);
return
true
;
}
LLEventPumps
::
instance
().
obtain
(
TOS_REPLY_PUMP
).
stopListening
(
TOS_LISTENER_NAME
);
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
()
...
...
indra/newview/lllogininstance.h
View file @
d9879194
...
...
@@ -84,6 +84,7 @@ class LLLoginInstance : public LLSingleton<LLLoginInstance>
void
syncWithUpdater
(
ResponsePtr
resp
,
const
LLSD
&
notification
,
const
LLSD
&
response
);
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?
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment