Skip to content

Commit

Permalink
bugfix flike#329
Browse files Browse the repository at this point in the history
  • Loading branch information
flike committed Apr 1, 2017
1 parent 9e216ed commit b38fc4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/hack/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hack

const (
Version = "2017-02-26 12:23:39 +0800 @069e2f4"
Compile = "2017-03-05 10:35:24 +0800 by go version go1.8 darwin/amd64"
Version = "2017-03-05 11:28:16 +0800 @9e216ed"
Compile = "2017-04-02 07:55:14 +0800 by go version go1.8 darwin/amd64"
)
7 changes: 6 additions & 1 deletion proxy/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (s *Server) parseAllowIps() error {
return nil
}

//TODO parse the blacklist sql file
//parse the blacklist sql file
func (s *Server) parseBlackListSqls() error {
bs := new(BlacklistSqls)
bs.sqls = make(map[string]string)
Expand All @@ -124,6 +124,11 @@ func (s *Server) parseBlackListSqls() error {
line, err := rd.ReadString('\n')
//end of file
if err == io.EOF {
if len(line) != 0 {
fingerPrint := mysql.GetFingerprint(line)
md5 := mysql.GetMd5(fingerPrint)
bs.sqls[md5] = fingerPrint
}
break
}
if err != nil {
Expand Down

0 comments on commit b38fc4f

Please sign in to comment.