Trên GitHub, cure53/jPurify đã đạt 65 sao, ngôn ngữ JavaScript. jPurify
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Warning: This tool is experimental and currently not maintained. Don't use it in production.
Please feel free to take it and feed it if you like it!
jPurify
jPurify is a plugin that automatically adds XSS-safety to jQuery. The reason why we do that is jQuery's lack of DOMXSS protection. We wanted to create a jQuery plugin, that adds super-easy-to-use and fully automatic HTML sanitation to the whole jQuery API. jPurify has been tested with jQuery 1.11.1 and 2.1.1. It's known to work well down until jQuery 1.5.2.
jPurify is maintained by the same people that look after DOMPurify. It works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Firefox and Chrome - as well as almost anything else using Blink or WebKit). It doesn't break on IE6 or other legacy browsers. It simply does nothing there.
What does it do?
jPurify, once included, simply overwrites some security-critical jQuery methods and adds proper HTML sanitation. Let's have a look at an example to clarify (here's a small live-demo):
<html>
<head>
<script src="jquery.js"></script>
</head>
<body>
<div id="html"></div>
<script>
// location.hash could be <svg/onload=alert(domain)>
$('#html').html('<h1>'+location.hash+'</h1>');
</script>
</body>
</html>
This code shown above is vulnerable to XSS. An attacker can influence location.hash to contain evil HTML and then attack your website's users. Not nice. Now let's have a look at what jPurify accomplishes:
<html>
<head>
<script src="jquery.js"></script>
<!-- makes the code below be secure -->
<script src="purify.js"></script>
<script src="jpurify.js"></script>
</head>
<body>
<div id="html"></div>
<script>
// location.hash could be <svg/onload=alert(domain)>
$('#html').html('<h1>'+location.hash+'</h1>');
</script>
</body>
</html>
Now, the XSS attack is being blocked. jPurify inspects and sanitizes the arguments sent to the vulnerable methods. The bad stuff is being removed, the good stuff is left intact, happy times.
How do I use it?
It's easy. Just include DOMPurify and jPurify on your website. It will seamlessly plug into jQuery and sanitize any potentially dangerous DOM-transaction.
jQuery has crazy lots of XSS sinks and developers need to make sure that none is hit by user generated content. The more complex a website the harder that gets of course. That's where jPurify jumps in. We currently cover the following XSS sinks and sanitize them with DOMPurify:
Có — cure53/jPurify phát hành theo license MPL-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/cure53/jPurify.
cure53/jPurify có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho cure53/jPurify. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
cure53/jPurify có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho cure53/jPurify. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
cure53/jPurify còn đang phát triển không?
Commit gần nhất trên cure53/jPurify là 9.5 năm trước (theo timestamp GitHub). Repo có 9 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
cure53/jPurify dùng license gì?
cure53/jPurify phát hành theo license MPL-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về cure53/jPurify ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/cure53/jPurify là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc jPurify có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về jPurify.