Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
18db2af
buffer: faster case for create buffer from empty string
JacksonTian Dec 18, 2015
6e4d9b3
build: enable compilation for linuxOne
mhdawson Mar 28, 2016
f56d6ad
build: add missing `openssl_fips%` to common.gypi
indutny Mar 27, 2016
09dc4cc
build: add script to create Android .mk files
robertchiras Mar 3, 2016
882fa25
build: add suport for x86 architecture
robertchiras Mar 3, 2016
459a7d6
child_process: refactor self=this in socket_list
benjamingr Mar 23, 2016
37f4df4
deps: backport 8d00c2c from v8 upstream
bnoordhuis Mar 6, 2016
648e0c3
dns: Use object without protoype for map
benjamingr Mar 22, 2016
4916fff
dns: Refactor forEach to map
benjamingr Mar 22, 2016
715ba18
doc: fix doc for Buffer.readInt32LE()
ghaiklor Mar 24, 2016
0da59ef
doc: add instructions to only sign a release
Fishrock123 Mar 23, 2016
b9682af
doc: fix order of end tags of list after heading
Mar 3, 2016
fc6513d
doc: use consistent event name parameter
benjamingr Mar 22, 2016
93638e1
doc: explain path.format expected properties
eversojk Mar 19, 2016
9e5fe2b
doc: typo: interal->internal.
kosak Mar 22, 2016
8df627e
etw: fix descriptors of events 9 and 23
joaocgreis Mar 16, 2016
1490a45
fs: add the fs.mkdtemp() function.
ralt Feb 24, 2016
f275176
http: speed up checkIsHttpToken
JacksonTian Jan 21, 2016
1d4c751
zlib: Fix handling of gzip magic bytes mid-file
addaleax Mar 23, 2016
5b5cb7e
win,build: build and test add-ons on test-ci
Mar 24, 2016
dddd365
tools: fix json doc generation
firedfox Mar 29, 2016
cebb8d7
timers: fixing API refs to use safe internal refs
getify Aug 22, 2015
cc85dd7
test: fix test-debugger-client.js
Trott Mar 22, 2016
ee8de3f
test: fix flaky test-http-set-timeout
Trott Mar 23, 2016
42903cc
test: move dns test to test/internet
bnoordhuis Mar 25, 2016
25244c1
test: fix flaky test-net-socket-timeout
mscdex Mar 24, 2016
f616adb
test: confirm globals not used internally
Trott Mar 24, 2016
5dc8df2
test: exclude new fs watch test for AIX
mhdawson Mar 28, 2016
5822f47
test: remove the use of curl in the test suite
santigimeno Mar 16, 2016
b8415ad
test: add test for piping large input from stdin
addaleax Mar 29, 2016
3f6fbaf
src: override v8 thread defaults using cli options
tomgco Dec 18, 2015
58de768
repl: support standalone blocks
princejwesley Mar 7, 2016
6ea6b64
querystring: don't stringify bad surrogate pair
mscdex Mar 23, 2016
d1483f0
net: emit host in lookup event
entertainyou Mar 8, 2016
8982d09
deps: upgrade npm to 3.8.3
othiym23 Mar 30, 2016
a7710b0
lib: refactor code with startsWith/endsWith
JacksonTian Mar 17, 2016
8bd81b2
src: Add missing `using v8::MaybeLocal`
addaleax Mar 31, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
querystring: don't stringify bad surrogate pair
Fixes: #3702
PR-URL: #5858
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mscdex authored and evanlucas committed Mar 30, 2016
commit 6ea6b640c05fc855d4015fb930555014d98446fc
2 changes: 1 addition & 1 deletion lib/querystring.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ QueryString.escape = function(str) {
if (i < str.length)
c2 = str.charCodeAt(i) & 0x3FF;
else
c2 = 0;
throw new URIError('URI malformed');
lastPos = i + 1;
c = 0x10000 + (((c & 0x3FF) << 10) | c2);
out += hexTable[0xF0 | (c >> 18)] +
Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-querystring.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ qsWeirdObjects.forEach(function(testCase) {
assert.equal(testCase[1], qs.stringify(testCase[0]));
});

// invalid surrogate pair throws URIError
assert.throws(function() {
qs.stringify({ foo: '\udc00' });
}, URIError);

// coerce numbers to string
assert.strictEqual('foo=0', qs.stringify({ foo: 0 }));
assert.strictEqual('foo=0', qs.stringify({ foo: -0 }));
Expand Down