Security fixes and schema cleanup

- Fix SQL injection in displayprofile.asp (parameterized query)
- Add HTMLEncode to XSS-vulnerable output in 5 display pages
- Add Option Explicit to computers.asp, displaymachines.asp, displaypcs.asp, displayapplication.asp, displayprofile.asp
- Update STANDARDS.md with test script reference, secrets management, column naming gotchas
- Fix equipment type ranges in CLAUDE.md and QUICK_REFERENCE.md (1-15, 21-25)
- Add migration SQL to cleanup redundant PC machinetypes (34-46)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-12 07:22:16 -05:00
parent 693789138d
commit e0d89f9957
9 changed files with 258 additions and 57 deletions

View File

@@ -36,8 +36,8 @@ For production tasks, user must:
```
machines table (unified)
├── Equipment (machinetypeid 1-24, pctypeid IS NULL)
├── PCs (machinetypeid 33-35, pctypeid IS NOT NULL)
├── Equipment (machinetypeid 1-15 and 21-25, pctypeid IS NULL)
├── PCs (machinetypeid 33+, pctypeid IS NOT NULL)
└── Network Devices (machinetypeid 16-20)
printers table (separate)
@@ -51,8 +51,9 @@ machinerelationships table (PC↔equipment links)
-- All PCs
SELECT * FROM machines WHERE pctypeid IS NOT NULL;
-- All Equipment
SELECT * FROM machines WHERE pctypeid IS NULL AND machinetypeid < 16;
-- All Equipment (excludes network devices and PCs)
SELECT * FROM machines WHERE pctypeid IS NULL
AND machinetypeid NOT IN (16,17,18,19,20) AND machinetypeid < 33;
-- Network devices
SELECT * FROM machines WHERE machinetypeid IN (16,17,18,19,20);