postgres-cn / website Goto Github PK
View Code? Open in Web Editor NEWWebsite for postgres.cn (PostgreSQL China Community)
Website for postgres.cn (PostgreSQL China Community)
Payload:<script>alert("xss")</script>
疑是漏洞源码位置:
website/application/views/v2/search.php
Line 31 in de8d044
9.3~9.5版本手册全文检索查找不到结果
9.3~9.6版本的手册是HTML格式,不是well-formed XML(PG10以后是well-formed XML格式)。调用loadXML导入会失败,导致插入到数据库中得到记录不完整,没有提取到keywords。
$doc = new DOMDocument();
$content = file_get_contents('/var/www/html/docs/9.6/btree-gist.html');
$doc->loadXML($content);
/var/www/html/application/logs/log-2020-10-04.php
ERROR - 2020-10-04 02:04:48 --> Severity: Warning --> DOMDocument::loadXML(): Opening and ending tag mismatch: META line 27 and HEAD in Entity, line: 30 /var/www/html/application/controllers/v2/doc_search.php 113
/var/www/html/docs/9.6/btree-gist.html:27
CONTENT="text/html; charset=utf-8"><META
NAME="creation"
CONTENT="2020-10-03T18:03:22"></HEAD
注: 奇怪的是,以前9.3~9.6创建索引是成功的,最近更新索引失败了。怀疑虚机环境发生过变更,以前loadXML()检查不严格,现在严格了。
建议修改html加载方式
/var/www/html/application/controllers/v2/doc_search.php
$doc->loadXML($content);
==>
$doc->loadHTML($content);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.