Skip to content

CSP violation #457

@AnaghaForBike

Description

@AnaghaForBike

Hi,

While trying to enable Content Security Policy (CSP), we came cross direct use of inline css in the package webpack-hot-middleware
in file https://github.com/webpack-contrib/webpack-hot-middleware/blob/master/client-overlay.js. i.e.

var color = problemColors[type] || colors.red;
  return (
    '<span style="background-color:#' +
    color +
    '; color:#000000; padding:3px 6px; border-radius: 4px;">' +
    type.slice(0, -1).toUpperCase() +
    '</span>'
  );

Which is flagged as CSP violation. To fix this, we need to replace usage of eval/dynamic function to something safe. Can you please take care in your package webpack-hot-middleware

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions