good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
open
bor
Commits
2d1ced87
Commit
2d1ced87
authored
9 years ago
by
Felix Lange
Browse files
Options
Downloads
Plain Diff
Merge pull request #1739 from bas-vk/empty-password
rpc/api allow empty password
parents
6ec13e7e
39e95606
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rpc/api/personal.go
+2
-2
2 additions, 2 deletions
rpc/api/personal.go
rpc/api/personal_args.go
+2
-2
2 additions, 2 deletions
rpc/api/personal_args.go
with
4 additions
and
4 deletions
rpc/api/personal.go
+
2
−
2
View file @
2d1ced87
...
...
@@ -110,7 +110,7 @@ func (self *personalApi) UnlockAccount(req *shared.Request) (interface{}, error)
return
nil
,
shared
.
NewDecodeParamError
(
err
.
Error
())
}
if
len
(
args
.
Passphrase
)
==
0
{
if
args
.
Passphrase
==
nil
{
fe
:=
self
.
xeth
.
Frontend
()
if
fe
==
nil
{
return
false
,
fmt
.
Errorf
(
"No password provided"
)
...
...
@@ -121,6 +121,6 @@ func (self *personalApi) UnlockAccount(req *shared.Request) (interface{}, error)
am
:=
self
.
ethereum
.
AccountManager
()
addr
:=
common
.
HexToAddress
(
args
.
Address
)
err
:=
am
.
TimedUnlock
(
addr
,
args
.
Passphrase
,
time
.
Duration
(
args
.
Duration
)
*
time
.
Second
)
err
:=
am
.
TimedUnlock
(
addr
,
*
args
.
Passphrase
,
time
.
Duration
(
args
.
Duration
)
*
time
.
Second
)
return
err
==
nil
,
err
}
This diff is collapsed.
Click to expand it.
rpc/api/personal_args.go
+
2
−
2
View file @
2d1ced87
...
...
@@ -46,7 +46,7 @@ func (args *NewAccountArgs) UnmarshalJSON(b []byte) (err error) {
type
UnlockAccountArgs
struct
{
Address
string
Passphrase
string
Passphrase
*
string
Duration
int
}
...
...
@@ -70,7 +70,7 @@ func (args *UnlockAccountArgs) UnmarshalJSON(b []byte) (err error) {
if
len
(
obj
)
>=
2
&&
obj
[
1
]
!=
nil
{
if
passphrasestr
,
ok
:=
obj
[
1
]
.
(
string
);
ok
{
args
.
Passphrase
=
passphrasestr
args
.
Passphrase
=
&
passphrasestr
}
else
{
return
shared
.
NewInvalidTypeError
(
"passphrase"
,
"not a string"
)
}
...
...
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