Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
053d62ff
Commit
053d62ff
authored
Aug 05, 2020
by
Mrs4s
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39 from 0akarma/master
Fix permission check of http.go
parents
8094553b
34d2d4fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
server/http.go
server/http.go
+7
-6
No files found.
server/http.go
View file @
053d62ff
...
...
@@ -4,14 +4,15 @@ import (
"crypto/hmac"
"crypto/sha1"
"encoding/hex"
"strconv"
"strings"
"time"
"github.com/Mrs4s/go-cqhttp/coolq"
"github.com/gin-gonic/gin"
"github.com/guonaihong/gout"
log
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"strconv"
"strings"
"time"
)
type
httpServer
struct
{
...
...
@@ -61,12 +62,12 @@ func (s *httpServer) Run(addr, authToken string, bot *coolq.CQBot) {
c
.
AbortWithStatus
(
401
)
return
}
}
if
c
.
Query
(
"access_token"
)
!=
authToken
{
}
else
if
c
.
Query
(
"access_token"
)
!=
authToken
{
c
.
AbortWithStatus
(
401
)
return
}
else
{
c
.
Next
()
}
c
.
Next
()
})
}
...
...
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