Skip to content

Commit

Permalink
fix: 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Oct 11, 2022
1 parent f706fb2 commit ddc7a9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-security",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/server/middleware/xssValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const securityConfig = useRuntimeConfig().security
export default defineEventHandler(async (event) => {
if (['POST', 'GET'].includes(event.req.method!!)) {
const valueToFilter = event.req.method === 'GET' ? getQuery(event) : readBody(event)
const xssValidator = new FilterXSS(securityConfig.xss.value)
const xssValidator = new FilterXSS(securityConfig.xssValidator.value)
const stringifiedValue = JSON.stringify(valueToFilter)
const processedValue = xssValidator.process(JSON.stringify(valueToFilter))
if (processedValue !== stringifiedValue) {
Expand Down

0 comments on commit ddc7a9a

Please sign in to comment.