developit / developit/vhtml

Possible injection because of sanitize cache

Đang mở
#34 4 bình luận 8 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
814
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Basically it's possible to inject dirty html:
```js
const striked = 'test';

console.log(

{striked}
);
console.log(
test
);
console.log(
{striked}
);
```

This is the output:
```html

<strike>test</strike>

test

test

```

Expected output:
```html

<strike>test</strike>

test

<strike>test</strike>

```

After rendering `

test
`, it caches `test` and doesn't sanitize it anymore. It can be seen live [here](https://codepen.io/remziatay/pen/YzroqLm?editors=1010) as well. Just because something was rendered before, it shouldn't mean that it's sanitized.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.