Kaynağa Gözat

Merge pull request #241 from maziggy/0.1.7

Fix for Information exposure through an exception #72
MartinNYHC 7 ay önce
ebeveyn
işleme
025325d9b0
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      backend/app/api/routes/settings.py

+ 2 - 1
backend/app/api/routes/settings.py

@@ -587,9 +587,10 @@ async def update_virtual_printer_settings(
             target_printer_serial=target_printer_serial,
         )
     except ValueError as e:
+        logger.warning(f"Virtual printer configuration validation error: {e}")
         return JSONResponse(
             status_code=400,
-            content={"detail": str(e)},
+            content={"detail": "Invalid virtual printer configuration. Check the provided values."},
         )
     except Exception as e:
         logger.error(f"Failed to configure virtual printer: {e}", exc_info=True)