Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong inline script hash when the file EOL is CRLF #111

Open
4 of 9 tasks
chihiroxc opened this issue Aug 15, 2022 · 1 comment
Open
4 of 9 tasks

Wrong inline script hash when the file EOL is CRLF #111

chihiroxc opened this issue Aug 15, 2022 · 1 comment

Comments

@chihiroxc
Copy link

chihiroxc commented Aug 15, 2022

Description

The hash is wrong when the index.html EOL is CRLF

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackhq/csp-html-webpack-plugin version: 5.1.0

node version: v16.15.1

OS version(s): Windows 10

Steps to reproduce:

  1. Change the index.html EOL to CRLF (the default EOL in Windows)
  2. Generate hash for inline script

Expected result:

The hash is generated correctly.

Actual result:

The hash is wrong for CRLF index.html

@melloware
Copy link

@chihiroxc I use a forked version of this plugin here and I use Windows and I have no issues. Can you try my forked version: https://github.com/melloware/csp-webpack-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants