You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using server example code on Linux and android client and EAP method is on PEAP when user tries to connect to ap and sends a request,the password is empty but username string is valid how can I solve the problem?
funcRadius() {
handler:=func(w radius.ResponseWriter, r*radius.Request) {
username:=rfc2865.UserName_GetString(r.Packet)
password:=rfc2865.UserPassword_GetString(r.Packet)
fmt.Println(username,password)
varcode radius.Codeifusername=="admin"&&password=="12345678" { //this condition is false always because password is empty code=radius.CodeAccessAccept
} else {
code=radius.CodeAccessReject
}
log.Printf("Writing %v to %v", code, r.RemoteAddr)
w.Write(r.Response(code))
}
server:= radius.PacketServer{
Handler: radius.HandlerFunc(handler),
SecretSource: radius.StaticSecretSource([]byte(`secret`)),
}
log.Printf("Starting server on :1812")
iferr:=server.ListenAndServe(); err!=nil {
log.Fatal(err)
}
}
The text was updated successfully, but these errors were encountered:
When clients use EAP/PEAP the password string is never going to be filled out because the user's password is inside of the EAP section of a packet. You can see a bit more about using EAP with this library in #10 (I don't think anything has changed on this front).
I'm using server example code on Linux and android client and
EAP method
is onPEAP
when user tries to connect to ap and sends a request,the password is empty but username string is valid how can I solve the problem?The text was updated successfully, but these errors were encountered: