Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICNML
web app
Commits
437d9ca6
Commit
437d9ca6
authored
5 years ago
by
Marco De Donno
Browse files
Options
Downloads
Patches
Plain Diff
Save the validated new user in the database
parent
8a96361f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
module.py
+2
-1
2 additions, 1 deletion
module.py
with
2 additions
and
1 deletion
module.py
+
2
−
1
View file @
437d9ca6
...
@@ -680,6 +680,7 @@ def do_validate_signin():
...
@@ -680,6 +680,7 @@ def do_validate_signin():
def
do_validate_signin_2
():
def
do_validate_signin_2
():
challenge
=
session
.
get
(
'
validation_user_challenge
'
)
challenge
=
session
.
get
(
'
validation_user_challenge
'
)
assertion_response
=
request
.
form
assertion_response
=
request
.
form
assertion_response_s
=
base64
.
b64encode
(
json
.
dumps
(
assertion_response
)
)
credential_id
=
assertion_response
.
get
(
'
id
'
)
credential_id
=
assertion_response
.
get
(
'
id
'
)
q
=
config
.
db
.
query
(
"
SELECT * FROM webauthn WHERE credential_id = %s
"
,
(
credential_id
,
)
)
q
=
config
.
db
.
query
(
"
SELECT * FROM webauthn WHERE credential_id = %s
"
,
(
credential_id
,
)
)
...
@@ -735,7 +736,7 @@ def do_validate_signin_2():
...
@@ -735,7 +736,7 @@ def do_validate_signin_2():
username
=
username
.
lower
()
username
=
username
.
lower
()
try
:
try
:
config
.
db
.
query
(
"
UPDATE signin_requests SET validation_time = now()
"
)
config
.
db
.
query
(
"
UPDATE signin_requests SET validation_time = now()
, assertion_response = %s
"
,
(
assertion_response_s
,
)
)
config
.
db
.
query
(
"
INSERT INTO users ( username, email, type ) VALUES ( %s, %s, %s )
"
,
(
username
,
email_hash
,
user_type
)
)
config
.
db
.
query
(
"
INSERT INTO users ( username, email, type ) VALUES ( %s, %s, %s )
"
,
(
username
,
email_hash
,
user_type
)
)
config
.
db
.
commit
()
config
.
db
.
commit
()
...
...
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