Closed Bug 883874 Opened 11 years ago Closed 11 years ago

Opening Introduction to HTML displays a Permission Denied Page

Categories

(developer.mozilla.org Graveyard :: General, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: praveen.vvstgy, Unassigned)

References

Details

(Whiteboard: [specification][type:bug])

What did you do?
================
1. I was already logged in
2. I Clicked on the Introduction to html link on the HTML page
3. 

What happened?
==============
On clicking the Introduction to HTML page displayed a Permission Denied page

What should have happened?
==========================
Introduction to HTML page at https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Introduction should have been displayed

Is there anything else we should know?
======================================
The page being displayed with the error is https://mdn.mozillademos.org/en-US/docs/HTML/Introduction$samples/Spl1?revision=360439
I cannot reproduce. Sheppy, any idea from a content perspective why this might have happened?
Flags: needinfo?(eshepherd)
This is still happening, in that the live samples on the page are not working. When I try to view them directly, I get the permission denied error:

https://mdn.mozillademos.org/en-US/docs/HTML/Introduction$samples/Spl1?revision=360439

We should find out why this is happening, as it's likely that it's affecting other demos on MDN, possibly including ones directly blocking the b2g launch docs.
Flags: needinfo?(eshepherd)
Pretty sure the Permission Denied is coming from here:

https://github.com/mozilla/kuma/blob/master/apps/wiki/views.py#L1806

That means there's some difference between what this code considers to be the "full_address" of the live sample, and what our regex considers allowable.
(In reply to Les Orchard [:lorchard] from comment #4)
> Pretty sure the Permission Denied is coming from here:
> 
> https://github.com/mozilla/kuma/blob/master/apps/wiki/views.py#L1806
> 
> That means there's some difference between what this code considers to be
> the "full_address" of the live sample, and what our regex considers
> allowable.

Yup, sure enough: I changed the regex that restricts what URL patterns are allowed for iframes and code samples to "^.*$", which allows everything. That made the Permission Denied go away.

But, we can't leave it like that, and need to figure out what `full_address` ends up being in the code so that we can configure the proper regex to let the right things through.
The permission denied page is still coming, and the same problem arises as before.
(In reply to praveen.vvstgy from comment #6)
> The permission denied page is still coming, and the same problem arises as
> before.

Looks like lorchard is on the trail though; should be fixed soon, I hope!
Commit pushed to 883874-iframe-hosts-header at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/c0712951d6d8a134b9ad95a414fa369324fba110
bug 883874: Temporary hack to let lmorchard see the Host header
Commit pushed to 883874-iframe-hosts-header at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/ca0288a56b2d89dcbc6839736aa6a7d3b082d8a1
bug 883874: Temporary hack to let lmorchard see the Host header (attempt 2)
More information - after pushing a dirty hack to prod [1], I discovered that apparently mdn.mozillademos.org thinks the `full_address` is this:

    https://developer-local:81/en-US/docs/HTML/Introduction$samples/Spl1

So, I think that adding developer-local:81 as an acceptable iframe domain is the fix. But, I haven't gotten that to work right away. Still poking.

[1]: https://github.com/mozilla/kuma/commit/ca0288a56b2d89dcbc6839736aa6a7d3b082d8a1
Okay, I think I've fixed this:

% curl -si 'https://mdn.mozillademos.org/en-US/docs/HTML/Introduction$samples/Spl1?revision=360439'
HTTP/1.1 200 OK
Server: Apache
X-Backend-Server: developer3.webapp.scl3.mozilla.com
X-Backend-Server: developer3.webapp.scl3.mozilla.com
Vary: Cookie, Accept-Encoding
Content-Type: text/html; charset=utf-8
Date: Fri, 21 Jun 2013 17:52:16 GMT
Transfer-Encoding: chunked
Access-Control-Allow-Origin: *
X-Cache-Info: caching

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="https://developer.mozilla.org/en-US/docs/Template:CustomSampleCSS?raw=1" />
            </head>
    <body>
                    <p>My dog ate all the guacamole.</p>
                    </body>
</html>
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.