You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The global variable Function('return this')(); doesn't comply with CSP no-unsafe-eval rule.
This is the same issue described in these two issues with the protobuf package: protocolbuffers/protobuf#6770 and protocolbuffers/protobuf#5464
We're patching our project with the following diff included from patch-package:
diff --git a/node_modules/@nextpay/grpc-node-status-proto/dist/google/code_pb.js b/node_modules/@nextpay/grpc-node-status-proto/dist/google/code_pb.js
index a2279f8..bdeec1d 100644
--- a/node_modules/@nextpay/grpc-node-status-proto/dist/google/code_pb.js+++ b/node_modules/@nextpay/grpc-node-status-proto/dist/google/code_pb.js@@ -9,7 +9,7 @@
var jspb = require('google-protobuf');
var goog = jspb;
-var global = Function('return this')();+var global = (function() { return this || window || global || self; }).call(null);
goog.exportSymbol('proto.google.rpc.Code', null, global);
/**
diff --git a/node_modules/@nextpay/grpc-node-status-proto/dist/google/error_details_pb.js b/node_modules/@nextpay/grpc-node-status-proto/dist/google/error_details_pb.js
index 21b1308..47cb470 100644
--- a/node_modules/@nextpay/grpc-node-status-proto/dist/google/error_details_pb.js+++ b/node_modules/@nextpay/grpc-node-status-proto/dist/google/error_details_pb.js@@ -9,7 +9,7 @@
var jspb = require('google-protobuf');
var goog = jspb;
-var global = Function('return this')();+var global = (function() { return this || window || global || self; }).call(null);
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
diff --git a/node_modules/@nextpay/grpc-node-status-proto/dist/google/status_pb.js b/node_modules/@nextpay/grpc-node-status-proto/dist/google/status_pb.js
index 2fb8b04..40d7347 100644
--- a/node_modules/@nextpay/grpc-node-status-proto/dist/google/status_pb.js+++ b/node_modules/@nextpay/grpc-node-status-proto/dist/google/status_pb.js@@ -9,7 +9,7 @@
var jspb = require('google-protobuf');
var goog = jspb;
-var global = Function('return this')();+var global = (function() { return this || window || global || self; }).call(null);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@nextpay/[email protected]
for the project I'm working on.The global variable
Function('return this')();
doesn't comply with CSP no-unsafe-eval rule.This is the same issue described in these two issues with the protobuf package: protocolbuffers/protobuf#6770 and protocolbuffers/protobuf#5464
We're patching our project with the following diff included from patch-package:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: