![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
xss-advanced
Advanced tools
Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with Express
Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with Express.
About middleware:
Content:
npm install xss-advanced@latest
Important note: You must use express.json() or body-parser middleware (in order to parse req.body) before adding xss-clean-advanced middleware
const xssAdvanced = require('xss-advanced')
const app = express();
<!-- First you add body parser middleware -->
app.use(express.json());
<!-- Then you add the middleware itself -->
app.use(xssAdvanced());
Since this middleware is built on top of xss, as a argument it acceps any options available by the xss library.
Argument | Default value | Available value |
---|---|---|
xssOptions | { css: false, stripIgnoreTagBody: ['script'] } | CHECK ALL AVAILABLE OPTIONS HERE |
Explanation | For default options: anywhere in the body, params or query, if there's <script> tag it will be REMOVED, however if element has css style property it will be PERSISTED | |
Examples | <script>test</script>test2 ---> test2; | |
<a href="test">da</a> ---> <a href>da</a> |
<!-- Example with using custom option, instead of default-->
const options = var options = {
whiteList: {
a: ["href", "title", "target"]
}
};
app.use(xssAdvanced(options));
If the example above returned <a href="test">da</a> ---> <a href>da</a>, this will return the full value:
THE DATA WILL BE FILTERED/XSS SANITIZED DEPENDING ON WHAT YOU PASS AS OPTIONS
By default all <script> tags are REMOVED, css styles are INCLUDED (of course you can exclude it with additional options), additional parametars like href, target, title that point to external links are also REMOVED
This examples are shown with the provided default options
FAQs
Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with Express
We found that xss-advanced demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.