! should be URL encoded in the SuperSearch API URL

RESOLVED FIXED

Status

Socorro
Webapp
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: peterbe, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
The ! character causes problems with pasting the URL into the command line. E.g. for running with curl. 

For example, go to https://crash-stats.mozilla.com/search/?ipc_channel_error=!__null__&date=%3E%3D2016-04-27&_facets=signature&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#crash-reports and click to see the API URL. 
If you paste that in bash will stumble on the !::

:~$ curl "https://crash-stats.mozilla.com/api/SuperSearch/?ipc_channel_error=!__null__&date=%3E%3D2016-04-27"
bash: !__null__: event not found


The solution is to replace ! with %21
(Assignee)

Updated

2 years ago
Assignee: nobody → peterbe
I'm not sure I want to fix this bug. ``jQuery.params`` doesn't encode anything. I'm not fond of the idea of escaping just one character for the sake of using curl more easily. 

To me the solution is to use single quotes in bash instead of double quotes. This works: 

curl 'https://crash-stats.mozilla.com/api/SuperSearch/?ipc_channel_error=!__null__&date=%3E%3D2016-04-27'

Comment 3

2 years ago
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/d1ad462a0aa19cd4b6c1dddc921b363a8c3ffa97
fixes bug 1270498 - ! should be URL encoded in the SuperSearch API URL (#3330)

r=adngdb

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.