Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.5.2 proposal #118

Merged
merged 47 commits into from
Apr 3, 2017
Merged

v0.5.2 proposal #118

merged 47 commits into from
Apr 3, 2017

Conversation

aqrln
Copy link
Member

@aqrln aqrln commented Apr 3, 2017

Version 0.5.2 (2017-03-03, @aqrln)

This is a backport release that brings the most essential changes and bugfixes
from v0.6 to currently used in at least one real project v0.5.

Notable changes:

  • parser: fix memory leaks (Alexey Orlenko) 371f7dd
  • parser: fix bugs in JSRS parser (Alexey Orlenko) #109
  • src,build: improve the native module subsystem (Alexey Orlenko) #110 [semver-minor]
  • build: compile in ISO C++11 mode (Alexey Orlenko) #37 [semver-minor]
  • parser: fix a possible memory leak (Alexey Orlenko) #44
  • parser: make parser single-pass (Mykola Bilochub) #61
  • parser: improve string parsing (Mykola Bilochub) #66
  • parser: fix bug causing node to crash (Mykola Bilochub) #75
  • connection: check that method arguments exist (Alexey Orlenko) #100

All changes:

  • parser: fix memory leaks (Alexey Orlenko) 371f7dd
  • parser: fix bugs in JSRS parser (Alexey Orlenko) #109
  • parser: fix compiler warnings (Alexey Orlenko) 851a2c6
  • examples: fix inconsistency with specification (Alexey Orlenko) 05461bf
  • lint: ignore Object Serialization examples (Alexey Orlenko) 94609f0
  • dist: update LICENSE (Alexey Orlenko) 8c5f830
  • src: simplify and update license boilerplates (Alexey Orlenko) 16b1e95
  • test: add Node.js 7.3 and 7.4 to .travis.yml (Alexey Orlenko) fa722e7
  • src,build: improve the native module subsystem (Alexey Orlenko) #110 [semver-minor]
  • src,build: add missing header (Mykola Bilochub) #64
  • build: compile in ISO C++11 mode (Alexey Orlenko) #37 [semver-minor]
  • doc: document versioning policy (Alexey Orlenko) #42
  • parser: fix a possible memory leak (Alexey Orlenko) #44
  • test: add Node.js 7.5 to .travis.yml (Alexey Orlenko) #47
  • doc: fix a typo in protocol.md (Alexey Orlenko) #55
  • server: clean internal structures on close (Alexey Orlenko) #59
  • src: add curly braces in switch statements (Mykola Bilochub) #62
  • parser: make parser single-pass (Mykola Bilochub) #61
  • src: fix single-line comment spacing (Mykola Bilochub) #67
  • parser: improve string parsing (Mykola Bilochub) #66
  • src: fix inconsistency in empty string creation (Mykola Bilochub) #70
  • doc: document protocol versioning policy (Alexey Orlenko) #56
  • parser: fix bug causing node to crash (Mykola Bilochub) #75
  • connection: close connection on transport error (Alexey Orlenko) #78
  • doc: fix mistyped repository name (Alexey Orlenko) #111
  • test: fix typos in connection.test.js (Alexey Orlenko) #112
  • tools: remove crlf.js from dot-ignore files (Alexey Orlenko) #83
  • npm: don't include doc/ and mkdocs.yml to package (Alexey Orlenko) #82
  • test: add Node.js 6.10 and 7.6 to .travis.yml (Alexey Orlenko) #86
  • w3c-ws: emit missing error event (Alexey Orlenko) #93
  • test: add Node.js 7.7 to .travis.yml (Alexey Orlenko) #95
  • lib: fix behavior with util.inspect (Alexey Orlenko) #114
  • server: handle connection errors before handshake (Alexey Orlenko) #115
  • w3c-ws: fix invalid property access (Alexey Orlenko) #116
  • src: fix incorrect indentation in CodePointToUtf8 (Alexey Orlenko) #103
  • connection: check that method arguments exist (Alexey Orlenko) #100
  • meta: update AUTHORS and .mailmap (Alexey Orlenko) #117
  • meta: fix misleading language in LICENSE (Alexey Orlenko) #117
  • connection: handle optional callbacks properly (Alexey Orlenko) #113
  • test: add Node.js 7.8 to .travis.yml (Alexey Orlenko) #119
  • lint: add bitHound config (Alexey Orlenko) #120
  • lib: decouple ensureClientConnected() (Alexey Orlenko) #120
  • client: handle errors in connectAndInspect (Alexey Orlenko) #120
  • test: refactor RawServerMock (Alexey Orlenko) #120
  • deps: update dependencies (Alexey Orlenko) #120

aqrln and others added 30 commits April 3, 2017 14:51
This is a backport of a330539.

* Fix possible out-of-range array indexing in GetControlChar
* Fix out-of-range array indexing in ReadHexNumber
* Add tests

PR-URL: #109
This commit adds explicit type casts to resolve compiler warnings about
possible data loss.
Rename Object Serialization example from `person.jsrs` into `person.js`
and add a missing Record Serialization example under that name.
Remove the unnecessary "All rights reserved" phrase since the last
country which laws used to required it got rid of it in 2000 and it has
meant nothing throughout the rest of the world since very long time ago.
* Replace license text with references to the LICENSE files.
* Update years.
* Split `jsrs-impl.cc` into separate modules.
* Make some refactoring.
* Rename the native addon to `jstp` since there already is a function
  that is not a part of JSRS.
* Fix `binding.gyp`: make `cflags` not ignored on macOS (as it appeared
  they used to be) and do not use `-O3` in Debug configuration.
* Use a macro to throw V8 exceptions to avoid boilerplate code.

Backport-of: #36
PR-URL: #110
Fix compilation error caused by missing `<cstddef>` header
needed for `std::size_t` type.

PR-URL: #64
* Use `cflags_cc` instead of `cflags`.

* By default `node-gyp` uses `-std=gnu++0x`. This commit modifies
  `cflags_cc` to use `-std=c++11`.

PR-URL: #37
This commit documents the pre-1.0 versioning policy as a Markdown file.

Refs: #38
PR-URL: #42
s/Successfull/Successful

PR-URL: #55
* Eliminate `jstp::parser::internal::PrepareString` function thus
  avoiding extra memory copying.
* Fix deleting comment blocks located inside of strings.
* Fix key parsing not throwing error when it included spaces
  but was not enclosed in quotes.

Fixes: #60
PR-URL: #61
* Eliminate unnecessary assignments.
* Encode control characters in place to avoid copying and memory
  allocations.
* Fix possible memory leak.

PR-URL: #66
In order to communicate with developers of alternative implementations
and be reasonable about compatibility, we need to assign versions to
the protocol too. This commit documents the protocol versioning policy.

PR-URL: #56
This commit forces a connection to close if a transport emits error.
Socket-related errors should have been already doing this, but parse
errors just emitted error events that caused the invalid chunk to be
parsed over and over again if the event was intercepted.

Refs: #76
PR-URL: #78
Fix incorrect repo name in implementations table that can be found in
`README.md` and `doc/index.md`.

Backport-of: #45
PR-URL: #111
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
s/Sessision/Session

Backport-of: #51
PR-URL: #112
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
This entry was copied from .gitignore file of Impress (as the whole file
was copied) at some time in the beginning of the project.  I guess, it
had been used by @tshemsedinov long time ago, but now Impress itself
doesn't have such entry in its ignore-files.

The next step will be to review my `dev/` directory, remove the helpers
that I don't need anymore and refactor the rest of them to publicly
available tests and tools to be placed in the corresponding directories
of the repository.

PR-URL: #83
This commit fixes a critical issue that allowed to crash the server
with an unhandled error event sending an invalid packet that causes
parser error before a handshake.

Fixes: #76
Backport-of: #78
PR-URL: #115
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
s/connection/socketEventEmitter

Backport-of: #94
PR-URL: #116
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
PR-URL: #103
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
The common implementation of `application.callMethod()` involves
checking `args.length` which leads to crash if `args` is null or
undefined.  This commit provides a quick-and-dirty patch for only
this vulnerability until the common approach for message sanity
checking will have been developed.

PR-URL: #100
* Add all the contributors using `tools/update-authors.js`.
* Sort the mail map alphabetically.

Backport-of: #88
PR-URL: #117
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
Backport-of: #88
PR-URL: #117
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
For some public methods of Connection that perform network actions
callbacks are optional. This commit fixes the behavior of default
actions when a callback function is not passed so that (1) the system
logic is always run and (2) a Connection doesn't complain about
callback packets for unknown source packets.

Backport-of: #52
PR-URL: #113
Reviewed-by: Mykola Bilochub <nbelochub@gmail.com>
@aqrln aqrln self-assigned this Apr 3, 2017
@aqrln aqrln requested a review from belochub April 3, 2017 12:05
@belochub
Copy link
Member

belochub commented Apr 3, 2017

In my opinion we should backport the patches concerning bitHound errors.

PR-URL: #119
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
This is a partial backport of 4f83d92
and a backport of 60ae973 together with
that.

PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
This is a backport of eb49729.

PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
This is kind of backports PR #105 in a different way, and this way
might be even better than that the original commit used.

The reason of doing this for v0.5, besides fixing a bug, is the fact
that we cannot use metasync in v0.5 since it is not compatible with old
Node.js versions while old library versions that used to be are too
outdated and even get reported by bitHound as insecure.

Backport-of: #105
PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Original commit: 16d8c85

PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
This is a backport of eafafd1,
6069f18 and
691795b.

PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
@aqrln
Copy link
Member Author

aqrln commented Apr 3, 2017

@belochub done. The only bitHound error we'll have for v0.5 now is the stale webpack devDependency, which we, unfortunately, cannot upgrade in this release for compatibility reasons. That's not critical, though.

Copy link
Member

@belochub belochub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This is a backport release that brings the most essential changes and
bugfixes from v0.6 to currently used in at least one real project v0.5.

Notable changes:

 * parser: fix memory leaks (Alexey Orlenko)
 * parser: fix bugs in JSRS parser (Alexey Orlenko)
 * src,build: improve the native module subsystem (Alexey Orlenko)
 * build: compile in ISO C++11 mode (Alexey Orlenko)
 * parser: fix a possible memory leak (Alexey Orlenko)
 * parser: make parser single-pass (Mykola Bilochub)
 * parser: improve string parsing (Mykola Bilochub)
 * parser: fix bug causing node to crash (Mykola Bilochub)
 * connection: check that method arguments exist (Alexey Orlenko)

PR-URL: #118
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
@aqrln aqrln merged commit 82ceb59 into v0.5 Apr 3, 2017
@aqrln aqrln deleted the v0.5.2-proposal branch April 3, 2017 19:19
aqrln added a commit that referenced this pull request Apr 3, 2017
This is a backport release that brings the most essential changes and
bugfixes from v0.6 to currently used in at least one real project v0.5.

Notable changes:

 * parser: fix memory leaks (Alexey Orlenko)
 * parser: fix bugs in JSRS parser (Alexey Orlenko)
 * src,build: improve the native module subsystem (Alexey Orlenko)
 * build: compile in ISO C++11 mode (Alexey Orlenko)
 * parser: fix a possible memory leak (Alexey Orlenko)
 * parser: make parser single-pass (Mykola Bilochub)
 * parser: improve string parsing (Mykola Bilochub)
 * parser: fix bug causing node to crash (Mykola Bilochub)
 * connection: check that method arguments exist (Alexey Orlenko)

PR-URL: #118
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
aqrln added a commit that referenced this pull request Apr 3, 2017
aqrln added a commit that referenced this pull request Apr 3, 2017
belochub pushed a commit that referenced this pull request Jan 22, 2018
This is a backport release that brings the most essential changes and
bugfixes from v0.6 to currently used in at least one real project v0.5.

Notable changes:

 * parser: fix memory leaks (Alexey Orlenko)
 * parser: fix bugs in JSRS parser (Alexey Orlenko)
 * src,build: improve the native module subsystem (Alexey Orlenko)
 * build: compile in ISO C++11 mode (Alexey Orlenko)
 * parser: fix a possible memory leak (Alexey Orlenko)
 * parser: make parser single-pass (Mykola Bilochub)
 * parser: improve string parsing (Mykola Bilochub)
 * parser: fix bug causing node to crash (Mykola Bilochub)
 * connection: check that method arguments exist (Alexey Orlenko)

PR-URL: #118
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
belochub pushed a commit that referenced this pull request Jan 22, 2018
This is a backport release that brings the most essential changes and
bugfixes from v0.6 to currently used in at least one real project v0.5.

Notable changes:

 * parser: fix memory leaks (Alexey Orlenko)
 * parser: fix bugs in JSRS parser (Alexey Orlenko)
 * src,build: improve the native module subsystem (Alexey Orlenko)
 * build: compile in ISO C++11 mode (Alexey Orlenko)
 * parser: fix a possible memory leak (Alexey Orlenko)
 * parser: make parser single-pass (Mykola Bilochub)
 * parser: improve string parsing (Mykola Bilochub)
 * parser: fix bug causing node to crash (Mykola Bilochub)
 * connection: check that method arguments exist (Alexey Orlenko)

PR-URL: #118
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants