Ver código fonte

fix(asset-server-plugin): Do not return raw error message on error

https://github.com/vendure-ecommerce/vendure/security/code-scanning/15
Michael Bromley 1 ano atrás
pai
commit
801980e8f5
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      packages/asset-server-plugin/src/plugin.ts

+ 2 - 2
packages/asset-server-plugin/src/plugin.ts

@@ -310,8 +310,8 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap {
                         res.send(imageBuffer);
                         return;
                     } catch (e: any) {
-                        Logger.error(e, loggerCtx, e.stack);
-                        res.status(500).send(e.message);
+                        Logger.error(e.message, loggerCtx, e.stack);
+                        res.status(500).send('An error occurred when generating the image');
                         return;
                     }
                 }