pen-test-package 1.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pen-test-package might be problematic. Click here for more details.

package/.babelrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "presets": ["@babel/preset-env", "@babel/preset-react"]
3
+ }
4
+
package/lib/Button.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ // src/Button.js
10
+
11
+ function createMarkup() {
12
+ return {
13
+ __html: '<img src=x onerror=alert(1) />'
14
+ };
15
+ }
16
+ function Button() {
17
+ return /*#__PURE__*/_react["default"].createElement("div", {
18
+ dangerouslySetInnerHTML: createMarkup()
19
+ });
20
+ }
21
+ var _default = exports["default"] = Button;
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "pen-test-package",
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "main": "lib/Button.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "peerDependencies": {
13
+ "react": "^18.2.0",
14
+ "react-dom": "^18.2.0"
15
+ },
16
+ "devDependencies": {
17
+ "@babel/cli": "^7.23.0",
18
+ "@babel/preset-env": "^7.22.20",
19
+ "@babel/preset-react": "^7.22.15"
20
+ }
21
+ }
package/src/Button.js ADDED
@@ -0,0 +1,13 @@
1
+ // src/Button.js
2
+ import React from 'react';
3
+
4
+ function createMarkup() {
5
+ return {__html: '<img src=x onerror=alert(1) />'};
6
+ }
7
+
8
+ function Button() {
9
+ return <div dangerouslySetInnerHTML={createMarkup()} />;
10
+ }
11
+
12
+ export default Button;
13
+