Commit Graph

28 Commits

Author SHA1 Message Date
Houmgaor
d32e77efba refactor: replace panic calls with structured error handling
Replace ~25 panic() calls in non-fatal code paths with proper
s.logger.Error + return patterns. Panics in handler code crashed
goroutines (caught by defer/recover but still disruptive) instead
of failing gracefully.

Key changes:
- SJISToUTF8 now returns (string, error); all 30+ callers updated
- Handler DB/IO panics replaced with log + return/ack fail
- Unhandled switch-case panics replaced with logger.Error
- Sign server Accept() panic replaced with log + continue
- Dead unreachable panic in guild_model.go removed
- deltacomp patch error logs and returns partial data

Panics intentionally kept: ByteFrame sentinel, unimplemented
packet stubs, os.Exit in main.go.
2026-02-20 19:11:41 +01:00
Houmgaor
06cb3afa57 refactor: standardize logging on zap across all packages
Replace all fmt.Printf/Println and log.Printf/Fatal with structured
zap.Logger calls to eliminate inconsistent logging (anti-pattern #12).

- network/crypt_conn: inject logger via NewCryptConn, replace 6 fmt calls
- signserver/session: use existing s.logger for debug packet dumps
- entranceserver: use s.logger for inbound/outbound debug logging
- api/utils: accept logger param in verifyPath, replace fmt.Println
- api/endpoints: use s.logger for screenshot path diagnostics
- config: replace log.Fatal with error return in getOutboundIP4
- deltacomp: replace log.Printf with zap.L() global logger
2026-02-20 18:59:12 +01:00
Houmgaor
2a0e3e2c84 fix: re-enable CI lint job and fix ~65 lint errors (partial)
Re-enable the golangci-lint job in CI (disabled Oct 2025), update to
Go 1.25 and golangci-lint-action v7. Fix errcheck, gosimple S1009,
staticcheck SA4031 and SA2001 errors across 54 files. Remaining ~39
lint errors will be addressed in follow-up commits.
2026-02-17 17:59:00 +01:00
stratic-dev
4d134d0624 Remove reformatting 2024-03-20 19:44:54 +00:00
stratic-dev
7d7fd50ba8 init ps4 support 2024-03-20 19:12:57 +00:00
wish
a968f18438 add support for SIGN requests 2024-02-20 14:53:59 +11:00
wish
0ea0dc217b simplify config 2023-12-31 12:51:24 +11:00
wish
86f63d6a38 properly support PS3 account linking 2023-08-09 22:04:15 +10:00
wish
2eeab72c1c update legacy WIIU code 2023-07-25 00:45:11 +10:00
wish
7edf07d853 use universal Sign request names 2023-07-25 00:44:19 +10:00
wish
a3e1207dfd fix conflicts 2023-07-24 23:42:51 +10:00
wish
2a9504cd26 Merge remote-tracking branch 'origin/main' into feature/psn-link
# Conflicts:
#	server/signserver/dbutils.go
#	server/signserver/dsgn_resp.go
#	server/signserver/session.go
2023-07-24 23:36:38 +10:00
wish
76a3d73102 add WIIUSGN:000 2023-07-03 03:59:00 +10:00
wish
e96e6372f5 hacky fix for PSSGN panic 2023-06-27 22:39:44 +10:00
wish
086b338f84 automatically create new character when none exist 2023-05-13 01:21:37 +10:00
wish
a260500bb5 further sign server rewrite 2023-04-30 13:51:30 +10:00
wish
6601285218 unfinished proof of concept 2023-04-30 01:32:38 +10:00
wish
058c387b11 only read first 64 bytes of wiiusgn key 2023-04-16 21:03:21 +10:00
wish
56ec654c72 wiiusgn test 2023-04-16 19:55:08 +10:00
wish
f379c27a01 combine login process again 2023-04-16 14:29:29 +10:00
wish
2e8d5fa823 implement support for PS3SGN 2023-04-16 14:15:22 +10:00
wish
90cb8525e5 add support for PS3SGN 2023-04-15 11:27:43 +10:00
wish
f5ae129cad implement psn linking capability 2023-04-15 11:00:49 +10:00
wish
2ede81925a rewrite signserver 2023-04-12 05:37:41 +10:00
wish
dcab41a6c7 rework logging code 2023-03-09 22:05:32 +11:00
wish
55f1de11fe add account creation toggle 2022-10-24 17:48:57 +11:00
wish
5e42402a3d signserver cleanup 2022-10-18 11:42:12 +11:00
wish
2c0e7a5267 repository cleanup 2022-07-29 03:25:23 +10:00