aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-01-08 13:42:29 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-01-08 13:42:29 -0700
commit7d4b31074d077fc09ec6aace34c21813e3103364 (patch)
tree6f797b98380e8f51eb05d08b4194309b3e00107c
parentcd06fc04864bf9c0fa9156af013bf9b6572ad76e (diff)
fix IndentalUserDB adding colons to usernames on write
-rw-r--r--indentalUserDB/indentalUserDB.go2
-rw-r--r--testData/userDB.ndtl31
2 files changed, 4 insertions, 29 deletions
diff --git a/indentalUserDB/indentalUserDB.go b/indentalUserDB/indentalUserDB.go
index 08cf1ef..4698979 100644
--- a/indentalUserDB/indentalUserDB.go
+++ b/indentalUserDB/indentalUserDB.go
@@ -176,7 +176,7 @@ func writeDB(filePath string, users map[string]*auth.User) error {
defer f.Close()
for _, user := range users {
- f.WriteString(fmt.Sprintf("%s:\n pass: %s\n session: %s\n loginTime: %s\n lastSeen: %s\n",
+ f.WriteString(fmt.Sprintf("%s\n pass: %s\n session: %s\n loginTime: %s\n lastSeen: %s\n",
user.Name,
user.Pass,
user.Session,
diff --git a/testData/userDB.ndtl b/testData/userDB.ndtl
index 9506698..e8e4193 100644
--- a/testData/userDB.ndtl
+++ b/testData/userDB.ndtl
@@ -1,30 +1,5 @@
-nilix:
- pass: $2a$10$IiB5QDloPOZWsdVioDYS.e0gaxQezuLmLIxtSiKC2z/.x1z2A0MyC
- session: YnDltzHIs#bkZa@sbKP#gNJpB#H_eU_jHeirWHYOmliJknG@KKghHinJXIJjDSbE
- loginTime: 1969-12-31 17:00:00 -0700 MST
- lastSeen: 1969-12-31 17:00:00 -0700 MST
-nilix::::::
- pass: $2a$10$.Y59TRn/.qBjT8KwleyrBePsC34EuPzrRlQr014bjEKuLoUCWDMtO
- session: eMOrLtCvjo_DTV_NqDLicJOugUALtiCIjdvPuzY@O!TOAAzunOs!jnCvCv#sQFxR
- loginTime: 0001-01-01 00:00:00 +0000 UTC
- lastSeen: 0001-01-01 00:00:00 +0000 UTC
-nilix:::::
- pass: $2a$10$9PegFcBV.M.AhpMDHeLD5OJoRp0O0Ddf5Gbne.t79gyTVffB2hC7a
- session: FFDcwx@vfauPc.buny$iBE.tcdwbfWgxgUdch_yhXuUPhAUvkOricxnHe#ZnmC_.
- loginTime: 0001-01-01 00:00:00 +0000 UTC
- lastSeen: 0001-01-01 00:00:00 +0000 UTC
-nilix:::
- pass: $2a$10$TocfVRA5fRVYOI0rXOQm7ucZgYjZvQhqSTdF2G7nvzsTJ77HPAXnm
- session: LxjHpBVLHd#ir!hgIIcrxnhQfXwxtcpsASjnT@kaEIKpJShHjlKaKxGcY.ImGRSw
- loginTime: 0001-01-01 00:00:00 +0000 UTC
- lastSeen: 0001-01-01 00:00:00 +0000 UTC
-nilix::::
- pass: $2a$10$a.SFEb.inhsTNPq9LnJVUeEBl4krZlX1GgTpbRXUX3KDQspiwFJ.G
- session: ycxbeIftKXS_ZgKdVUsJbCpeTvxPFlb$SRAj!TxpgKEKocHdMMitVU!lIrGhofnb
- loginTime: 0001-01-01 00:00:00 +0000 UTC
- lastSeen: 0001-01-01 00:00:00 +0000 UTC
-nilix::
- pass: $2a$10$Z81Ut6pKN7wtWS3EFoonzunMaohXVTNoQAdCu2OgwNn4IrkTwKnMm
- session: $DhiZZMFSuPhQfJBv_Nk#fksoOMyGxgCmmm$XLAvMhlhfpcgHuL#ElXwkrhnvTUO
+nilix
+ pass: $2a$10$gpuhifFxg2Q5OWHHwoGwJuAJEJ8BlOb93/Yc5u6yySak/5g0GWATi
+ session: uOMccuhCi$szzNqeWe@tDsNB$SjDzzHwHuzsJxmEsnuiA$sbissWFzdifwISF@eg
loginTime: 0001-01-01 00:00:00 +0000 UTC
lastSeen: 0001-01-01 00:00:00 +0000 UTC