Satoshi Nakamoto
f0786cf3fa
Update host and port for connection settings
2026-08-13 02:00:02 +02:00
GaltRanch
d79977ce00
Full security and code quality audit fixes across codebase
...
Security (Critical):
- Eliminate all shell=True command injection vectors (~95 instances in ppi.py, spvblock.py)
- Replace subprocess curl calls with requests library
- Add input validation (fiat code allowlist, IP address validation)
- Replace weak random.randint/choice with secrets module for crypto ops
- Remove token/credential exposure from print statements
- Add path traversal prevention in config.py
- Create .conf.example templates, scrub local credentials
Stability:
- Replace 63 bare except clauses with specific exceptions + logging
- Fix file handle leaks with context managers (lnd.py, apisnd.py)
- Add threading.Lock for race conditions in clock/data.py
- Cap unbounded list growth (MAX_HISTORY_LEN=50)
- Add timeout=10 to ~50 requests calls missing timeouts
Maintainability:
- Extract _load_macaroon() helper (dedup 69 instances in PyBlock.py)
- Extract _load_lnd_config() helper (dedup 33 instances in nodeconnection.py)
- Normalize json import (simplejson with stdlib fallback)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:57:20 -03:00
GaltRanch
00f39014bd
Fix unclosed sockets and add __main__ guard in SHS.py
...
- Wrap socket operations in try/finally to ensure sock.close() on errors
- Add if __name__ == '__main__' guard to prevent execution on import
- Applied to both pybitblock/SHS.py and pybitblock/SPV/SHS.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:06:00 -03:00
Satoshi Nakamoto
ce6caa6143
Change port number from 3333 to 4444
2025-12-12 20:15:58 +01:00
Satoshi Nakamoto
58f977a41b
Update SHS.py
2024-08-15 04:23:35 +02:00
Satoshi Nakamoto
c1c01acf79
Update SHS.py
2024-08-15 02:02:12 +02:00
Satoshi Nakamoto
3a192b6d50
Update SHS.py
2024-08-15 01:59:44 +02:00
Satoshi Nakamoto
3d9cf90f9c
Update SHS.py
2024-08-15 00:45:58 +02:00
Satoshi Nakamoto
6edd710e17
Update SHS.py
2024-08-15 00:19:55 +02:00
Satoshi Nakamoto
5eb1ebd76c
Update SHS.py
2024-08-15 00:16:43 +02:00
Satoshi Nakamoto
bd43d64aaf
Update SHS.py
2024-08-15 00:11:13 +02:00
Satoshi Nakamoto
b43a77258d
Create SHS.py
2024-08-13 16:39:30 +02:00