Fix Host check regexp from 10ad4c337
(And don't allow 127.0.0.1.evil.com)
This commit is contained in:
parent
10ad4c3379
commit
b2d580f3c9
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ Zotero.Server.DataListener.prototype._headerFinished = function() {
|
||||||
Zotero.debug(this.header, 5);
|
Zotero.debug(this.header, 5);
|
||||||
|
|
||||||
const methodRe = /^([A-Z]+) ([^ \r\n?]+)(\?[^ \r\n]+)?/;
|
const methodRe = /^([A-Z]+) ([^ \r\n?]+)(\?[^ \r\n]+)?/;
|
||||||
const hostRe = /[\r\n]Host: *127\.0\.0\.1(:[0-9]+)?([^ \r\n]+)/i;
|
const hostRe = /[\r\n]Host: *127\.0\.0\.1(:[0-9]+)?[\r\n]/i;
|
||||||
const contentTypeRe = /[\r\n]Content-Type: *([^ \r\n]+)/i;
|
const contentTypeRe = /[\r\n]Content-Type: *([^ \r\n]+)/i;
|
||||||
|
|
||||||
if(!Zotero.isServer) {
|
if(!Zotero.isServer) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue