Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
6b584096
Unverified
Commit
6b584096
authored
Nov 24, 2020
by
LieutenantRoger
Committed by
GitHub
Nov 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/faucet: improve handling of facebook post url (#21838)
Resolves #21532 Co-authored-by:
roger
<
dengjun@huobi.com
>
parent
ead81461
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
faucet.go
cmd/faucet/faucet.go
+4
-1
No files found.
cmd/faucet/faucet.go
View file @
6b584096
...
...
@@ -732,7 +732,10 @@ func authTwitter(url string) (string, string, common.Address, error) {
// returning the username, avatar URL and Ethereum address to fund on success.
func
authFacebook
(
url
string
)
(
string
,
string
,
common
.
Address
,
error
)
{
// Ensure the user specified a meaningful URL, no fancy nonsense
parts
:=
strings
.
Split
(
url
,
"/"
)
parts
:=
strings
.
Split
(
strings
.
Split
(
url
,
"?"
)[
0
],
"/"
)
if
parts
[
len
(
parts
)
-
1
]
==
""
{
parts
=
parts
[
0
:
len
(
parts
)
-
1
]
}
if
len
(
parts
)
<
4
||
parts
[
len
(
parts
)
-
2
]
!=
"posts"
{
//lint:ignore ST1005 This error is to be displayed in the browser
return
""
,
""
,
common
.
Address
{},
errors
.
New
(
"Invalid Facebook post URL"
)
...
...
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