Skip to content

Commit 2febab6

Browse files
committed
1 parent ceba82d commit 2febab6

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
unreleased
2+
==========
3+
4+
5+
- Fix edge cases with `isValid`
6+
17
1.0.3 / 2014-09-21
28
==================
39

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"repository": "jshttp/proxy-addr",
1313
"dependencies": {
1414
"forwarded": "~0.1.0",
15-
"ipaddr.js": "0.1.3"
15+
"ipaddr.js": "0.1.5"
1616
},
1717
"devDependencies": {
1818
"benchmark": "1.0.0",

test/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe('proxyaddr(req, trust)', function () {
6565
var req = createReq('127.0.0.1');
6666
assert.throws(proxyaddr.bind(null, req, 'blargh'), /invalid IP address/);
6767
assert.throws(proxyaddr.bind(null, req, '10.0.300.1/16'), /invalid IP address/);
68+
assert.throws(proxyaddr.bind(null, req, '-1'), /invalid IP address/);
6869
});
6970

7071
it('should reject bad CIDR', function () {
@@ -440,6 +441,7 @@ describe('proxyaddr.compile(trust)', function () {
440441

441442
it('should reject non-IP', function () {
442443
assert.throws(proxyaddr.compile.bind(null, 'blargh'), /invalid IP address/);
444+
assert.throws(proxyaddr.compile.bind(null, '-1'), /invalid IP address/);
443445
});
444446

445447
it('should reject bad CIDR', function () {

0 commit comments

Comments
 (0)