Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dfss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mpcs
dfss
Commits
607d1550
Commit
607d1550
authored
Feb 17, 2016
by
Loïck Bonniot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[c] Fix password question on non-unix terminals
parent
c17cfe72
Pipeline
#301
passed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
dfssc/register.go
dfssc/register.go
+9
-0
dfssp/entities/contract.go
dfssp/entities/contract.go
+2
-2
dfssp/user/create.go
dfssp/user/create.go
+2
-2
No files found.
dfssc/register.go
View file @
607d1550
...
...
@@ -80,6 +80,15 @@ func readIntParam(message, def string, ptr *int) {
// Get the password from standard input
func
readPassword
(
ptr
*
string
,
needConfirm
bool
)
error
{
if
!
terminal
.
IsTerminal
(
0
)
{
fmt
.
Println
(
"+------------------------- WARNING --------------------------+"
)
fmt
.
Println
(
"| This is not a UNIX terminal, your password will be visible |"
)
fmt
.
Println
(
"+------------------------- WARNING --------------------------+"
)
readStringParam
(
"Enter your passphrase"
,
""
,
ptr
)
return
nil
}
oldState
,
err
:=
terminal
.
MakeRaw
(
0
)
if
err
!=
nil
{
return
err
...
...
dfssp/entities/contract.go
View file @
607d1550
...
...
@@ -77,8 +77,8 @@ func (r *ContractRepository) GetWaitingForUser(email string) ([]Contract, error)
"ready"
:
false
,
"signers"
:
bson
.
M
{
"$elemMatch"
:
bson
.
M
{
"email"
:
email
,
"hash"
:
""
,
"email"
:
email
,
"hash"
:
""
,
}},
},
&
res
)
return
res
,
err
...
...
dfssp/user/create.go
View file @
607d1550
...
...
@@ -244,7 +244,7 @@ func launchMissedContracts(manager *mgdb.MongoManager, user *entities.User) {
repository
:=
entities
.
NewContractRepository
(
manager
.
Get
(
"contracts"
))
contracts
,
err
:=
repository
.
GetWaitingForUser
(
user
.
Email
)
if
err
!=
nil
{
log
.
Println
(
"Cannot get missed contracts for user"
,
user
.
Email
+
":"
,
err
)
log
.
Println
(
"Cannot get missed contracts for user"
,
user
.
Email
+
":"
,
err
)
}
for
_
,
c
:=
range
contracts
{
...
...
@@ -263,7 +263,7 @@ func launchMissedContracts(manager *mgdb.MongoManager, user *entities.User) {
// Update contract in database
_
,
err
=
repository
.
Collection
.
UpdateByID
(
c
)
if
err
!=
nil
{
log
.
Println
(
"Cannot update missed contract"
,
c
.
ID
,
"for user"
,
user
.
Email
+
":"
,
err
)
log
.
Println
(
"Cannot update missed contract"
,
c
.
ID
,
"for user"
,
user
.
Email
+
":"
,
err
)
}
if
c
.
Ready
{
...
...
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