mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
Fixes to authtoken/password indication at login
This commit is contained in:
parent
d25b883873
commit
2864940a8e
1 changed files with 6 additions and 1 deletions
|
@ -480,7 +480,9 @@ func main() {
|
||||||
if aerr == nil {
|
if aerr == nil {
|
||||||
//authCookie = string(ab)
|
//authCookie = string(ab)
|
||||||
idx := strings.Index(string(ab), remoteHost)
|
idx := strings.Index(string(ab), remoteHost)
|
||||||
|
//fmt.Printf("auth entry idx:%d\n", idx)
|
||||||
if idx >= 0 {
|
if idx >= 0 {
|
||||||
|
fmt.Fprintln(os.Stderr, "[authtoken]")
|
||||||
ab = ab[idx:]
|
ab = ab[idx:]
|
||||||
entries := strings.SplitN(string(ab), "\n", -1)
|
entries := strings.SplitN(string(ab), "\n", -1)
|
||||||
//if len(entries) > 0 {
|
//if len(entries) > 0 {
|
||||||
|
@ -494,8 +496,10 @@ func main() {
|
||||||
ab = nil
|
ab = nil
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintln(os.Stderr, "ERROR: no matching authtoken")
|
fmt.Fprintln(os.Stderr, "[no authtoken, use -g to request one from server]")
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.Printf("[cannot read %s/.hkexsh_id]\n", u.HomeDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,6 +507,7 @@ func main() {
|
||||||
// We must make the decision about interactivity before Dial()
|
// We must make the decision about interactivity before Dial()
|
||||||
// as it affects chaffing behaviour. 20180805
|
// as it affects chaffing behaviour. 20180805
|
||||||
if gopt {
|
if gopt {
|
||||||
|
fmt.Fprintln(os.Stderr, "[requesting authtoken from server]")
|
||||||
op = []byte{'A'}
|
op = []byte{'A'}
|
||||||
chaffFreqMin = 2
|
chaffFreqMin = 2
|
||||||
chaffFreqMax = 10
|
chaffFreqMax = 10
|
||||||
|
|
Loading…
Reference in a new issue