github-vet / github-vet/rangeloop-pointer-findings
Wooyme/WSocks-Go: WsocksServer/server.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Wooyme/WSocks-Go](https://www.github.com/Wooyme/WSocks-Go) at [WsocksServer/server.go](https://github.com/Wooyme/WSocks-Go/blob/824f551a0c32c1d7adc42dbc2636e390448aa614/WsocksServer/server.go#L58-L63)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to user is reassigned at line 62
[Click here to see the code in its original context.](https://github.com/Wooyme/WSocks-Go/blob/824f551a0c32c1d7adc42dbc2636e390448aa614/WsocksServer/server.go#L58-L63)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _,user:=range serverInfo.Users {
hash:=md5.New()
hash.Write([]byte("1"+user.User+user.Pass))
secret:= hex.EncodeToString(hash.Sum(nil))
authMap[secret] = &user
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 824f551a0c32c1d7adc42dbc2636e390448aa614
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with WsocksServer/server.go at lines 58-63 and read the surrounding authentication flow. Check whether the analyzer's report about the range-loop variable affects entries in authMap, then classify the finding as Bug, Mitigated, or Desirable Behavior based on the referenced commit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100