404 page replaces invalid url's protocol from HTTPS to HTTP in the link to file bug on Bugzilla

VERIFIED WORKSFORME

Status

VERIFIED WORKSFORME
5 years ago
5 years ago

People

(Reporter: vaidik, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fromAutomation])

(Reporter)

Description

5 years ago
Steps to reproduce:
1. Go to https://crash-stats.mozilla.com/invalid
2. Observe the "bug_file_loc" GET parameter of the link "issue in Bugzilla".

Expected value:
Current page's URL i.e. https://crash-stats.mozilla.com/invalid

Observed value:
Protocol is changed to HTTP i.e. http://crash-stats.mozilla.com/invalid

This is observed only on Prod and not on Dev/Stage.
xref bug 631737 - I'm not sure why we're seeing this again, now.
(In reply to Vaidik Kapoor [:vaidik] from comment #0)
> Steps to reproduce:
> 1. Go to https://crash-stats.mozilla.com/invalid
> 2. Observe the "bug_file_loc" GET parameter of the link "issue in Bugzilla".
> 
> Expected value:
> Current page's URL i.e. https://crash-stats.mozilla.com/invalid
> 
> Observed value:
> Protocol is changed to HTTP i.e. http://crash-stats.mozilla.com/invalid
> 
> This is observed only on Prod and not on Dev/Stage.

We are using {{ request.build_absolute_uri() | urlencode }} in the Jinja template ( see https://github.com/mozilla/socorro-crashstats/blob/master/crashstats/base/templates/404.html )

I suspect this is because the server is HTTP and SSL is terminated at the loadbalancer (zeus)...

peterbe, if the above is correct I think we might have to pull the server URL from the settings and build a relative path instead, what do you think?
(Assignee)

Comment 3

5 years ago
It's because it's not configured correctly. An environment variable tells Django to construct absolute URLs with https and it wasn't set up. 

I filed the dependent bug many days ago but stalled it because I was waiting for a more urgent feature to land but that's been taken care of. 

So once 881813 is resolved this bug should automatically resolve itself but it would be good to verify it first.
Depends on: 881813
(In reply to Peter Bengtsson [:peterbe] from comment #3)
> It's because it's not configured correctly. An environment variable tells
> Django to construct absolute URLs with https and it wasn't set up. 
> 
> I filed the dependent bug many days ago but stalled it because I was waiting
> for a more urgent feature to land but that's been taken care of. 
> 
> So once 881813 is resolved this bug should automatically resolve itself but
> it would be good to verify it first.

It's not.

http://crash-stats-dev.allizom.org/jfskdl

https://bugzilla.mozilla.org/enter_bug.cgi?product=Socorro&component=General&bug_file_loc=http%3A%2F%2Fcrash-stats-dev.allizom.org%2Fjfskdl

Still "http".
(Assignee)

Comment 5

5 years ago
Thought it was related to https://bugzilla.mozilla.org/show_bug.cgi?id=881813 but perhaps it's not.
Assignee: nobody → peterbe
Status: NEW → ASSIGNED
(Assignee)

Comment 6

5 years ago
No. The code is good. See http://cl.ly/QH66

https://bugzilla.mozilla.org/show_bug.cgi?id=881813 updated stage and prod.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
QA verified on stage and prod
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.