summaryrefslogtreecommitdiffstats
path: root/services/doctor/authorizedkeys.go
diff options
context:
space:
mode:
authorcoldWater <forsaken628@gmail.com>2024-03-19 03:20:36 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-26 19:04:25 +0100
commit664052fb0b603f4d57ecde5e5740c9137f89005c (patch)
treed0ca95ed18b6afe8842193ce99a4a85887151284 /services/doctor/authorizedkeys.go
parentRemove unused error in graceful manager (#29871) (diff)
downloadforgejo-664052fb0b603f4d57ecde5e5740c9137f89005c.tar.xz
forgejo-664052fb0b603f4d57ecde5e5740c9137f89005c.zip
Fix missing error check of bufio.Scanner (#29882)
maybe more (cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
Diffstat (limited to '')
-rw-r--r--services/doctor/authorizedkeys.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/doctor/authorizedkeys.go b/services/doctor/authorizedkeys.go
index 050a4e7974..43740af3db 100644
--- a/services/doctor/authorizedkeys.go
+++ b/services/doctor/authorizedkeys.go
@@ -50,6 +50,10 @@ func checkAuthorizedKeys(ctx context.Context, logger log.Logger, autofix bool) e
}
linesInAuthorizedKeys.Add(line)
}
+ err = scanner.Err()
+ if err != nil {
+ return fmt.Errorf("scan: %w", err)
+ }
f.Close()
// now we regenerate and check if there are any lines missing