Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Issue 12328021: Make sure package names are URL encoded. (Closed)

Created:
7 years, 10 months ago by Bob Nystrom
Modified:
7 years, 10 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make sure package names are URL encoded. If you happen to have a weird package name like "/* blah *?" you would get a nasty HTTP error when it tried to jam that in a URL. Instead, this will give you a friendlier 'package "/* blah */" not found error." BUG=http://code.google.com/p/dart/issues/detail?id=7466 Committed: https://code.google.com/p/dart/source/detail?r=18849

Patch Set 1 #

Total comments: 2

Patch Set 2 : URL encode version too. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -44 lines) Patch
M utils/pub/hosted_source.dart View 1 4 chunks +63 lines, -39 lines 0 comments Download
M utils/pub/validator/name.dart View 1 chunk +5 lines, -3 lines 0 comments Download
M utils/tests/pub/install/hosted/install_test.dart View 2 chunks +12 lines, -0 lines 0 comments Download
M utils/tests/pub/validator_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Bob Nystrom
7 years, 10 months ago (2013-02-20 22:41:29 UTC) #1
nweiz
lgtm https://codereview.chromium.org/12328021/diff/1/utils/pub/hosted_source.dart File utils/pub/hosted_source.dart (right): https://codereview.chromium.org/12328021/diff/1/utils/pub/hosted_source.dart#newcode166 utils/pub/hosted_source.dart:166: return new Uri(pattern(server, package, id.version.toString())); We should probably ...
7 years, 10 months ago (2013-02-21 01:21:58 UTC) #2
Bob Nystrom
Committed patchset #2 manually as r18849 (presubmit successful).
7 years, 10 months ago (2013-02-21 18:59:54 UTC) #3
Bob Nystrom
7 years, 10 months ago (2013-02-21 19:00:03 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/12328021/diff/1/utils/pub/hosted_source.dart
File utils/pub/hosted_source.dart (right):

https://codereview.chromium.org/12328021/diff/1/utils/pub/hosted_source.dart#...
utils/pub/hosted_source.dart:166: return new Uri(pattern(server, package,
id.version.toString()));
On 2013/02/21 01:21:58, nweiz wrote:
> We should probably URL-encode the version as well; it's possible for "+" to be
> misinterpreted somewhere along the line.

Good catch. Forgot about "+" in versions. Done.

Powered by Google App Engine
This is Rietveld 408576698