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

Port ReDoS vulnerability fix to Protobuf.js 5 #1030

Merged
merged 1 commit into from Apr 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "protobuf",
"description": "Protocol Buffers for JavaScript. Finally.",
"version": "5.0.2",
"version": "5.0.3",
"main": "dist/protobuf.js",
"license": "Apache-2.0",
"homepage": "http://dcode.io/",
Expand Down
6 changes: 3 additions & 3 deletions dist/protobuf-light.js
Expand Up @@ -57,7 +57,7 @@
* @const
* @expose
*/
ProtoBuf.VERSION = "5.0.2";
ProtoBuf.VERSION = "5.0.3";

/**
* Wire types.
Expand Down Expand Up @@ -429,10 +429,10 @@
TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,

// Type references
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,

// Fully qualified type references
FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,
FQTYPEREF: /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,

// All numbers
NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,
Expand Down
166 changes: 80 additions & 86 deletions dist/protobuf-light.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf-light.min.js.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions dist/protobuf-light.min.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/protobuf.js
Expand Up @@ -57,7 +57,7 @@
* @const
* @expose
*/
ProtoBuf.VERSION = "5.0.2";
ProtoBuf.VERSION = "5.0.3";

/**
* Wire types.
Expand Down Expand Up @@ -429,10 +429,10 @@
TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,

// Type references
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,

// Fully qualified type references
FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,
FQTYPEREF: /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,

// All numbers
NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,
Expand Down
198 changes: 96 additions & 102 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions dist/protobuf.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "protobufjs",
"version": "5.0.2",
"version": "5.0.3",
"description": "Protocol Buffers for JavaScript. Finally.",
"author": "Daniel Wirtz <dcode@dcode.io>",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions src/ProtoBuf/Lang.js
Expand Up @@ -21,10 +21,10 @@ ProtoBuf.Lang = {
TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/,

// Type references
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,
TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,

// Fully qualified type references
FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,
FQTYPEREF: /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,

// All numbers
NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,
Expand Down