Security: mask settings secrets, remove hardcoded employee-DB creds
- GET /settings now masks password/token values (were returned in plaintext to anonymous callers); sending the mask back on update is a no-op so the real secret is never clobbered. - Move the employee-directory DB credentials out of source into env-backed config (shopdb.utils.employee_db); employees + notification recognition use the shared helper. Employee lookups stop leaking exception strings. - Fix low-supplies report using loc.location instead of loc.locationname. Employee/notification read endpoints stay unauthenticated by design (public shopfloor kiosk displays consume them). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -565,7 +565,7 @@ def _get_low_supplies_data():
|
||||
from shopdb.core.models import Location
|
||||
loc = Location.query.get(asset.locationid)
|
||||
if loc:
|
||||
location_name = loc.location
|
||||
location_name = loc.locationname
|
||||
|
||||
results.append({
|
||||
'printerid': printer.printerid,
|
||||
|
||||
Reference in New Issue
Block a user