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

Issue 434094: This fixes an issue where view source on a local file would return a... (Closed)

Created:
11 years ago by Greg Spencer (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
amit
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Visibility:
Public.

Description

This fixes an issue where view source on a local file would return a blank page. This bug was introduced by the fix for issue 26129 (r30418), which was to limit view source so that it wouldn't be able to load javascript or data URLs, but that change forgot to allow file urls. This fixes the above omission by allowing file URLs again. TEST=works:view-source:file:///tmp/test.html, doesn't work:view-source:javascript:alert('foo') BUG=27409 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33380

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/browser/browser_url_handler.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Greg Spencer (Chromium)
11 years ago (2009-11-25 21:56:41 UTC) #1
amit
11 years ago (2009-11-26 00:12:49 UTC) #2
lgtm

On Wed, Nov 25, 2009 at 1:56 PM,  <gspencer@chromium.org> wrote:
> Reviewers: amit,
>
> Description:
> This fixes an issue where view source on a local file would return a
> blank page.
>
> This bug was introduced by the fix for issue 26129 (r30418), which
> was to limit view source so that it wouldn't be able to load
> javascript or data URLs, but that change forgot to allow file urls.
>
> This fixes the above omission by allowing file URLs again.
>
> TEST=works:view-source:file:///tmp/test.html, doesn't
> work:view-source:javascript:alert('foo')
> BUG=27409
>
> Please review this at http://codereview.chromium.org/434094
>
> SVN Base: http://src.chromium.org/svn/trunk/src/
>
> Affected files:
>  M     chrome/browser/browser_url_handler.cc
>
>
> Index: chrome/browser/browser_url_handler.cc
> ===================================================================
> --- chrome/browser/browser_url_handler.cc       (revision 32889)
> +++ chrome/browser/browser_url_handler.cc       (working copy)
> @@ -22,7 +22,7 @@
>     // other kind of 'active' url scheme like 'javascript' or 'data'.
>     static const char* const allowed_sub_schemes[] = {
>       chrome::kHttpScheme, chrome::kHttpsScheme, chrome::kFtpScheme,
> -      chrome::kChromeUIScheme
> +      chrome::kChromeUIScheme, chrome::kFileScheme
>     };
>
>     bool is_sub_scheme_allowed = false;
>
>
>

Powered by Google App Engine
This is Rietveld 408576698