Skip to content

Commit

Permalink
Fixes bug 731822 - Decode double encoded slashes in signature summary…
Browse files Browse the repository at this point in the history
… service.
  • Loading branch information
adngdb committed Mar 14, 2012
1 parent dfd3d29 commit 6df8779
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions socorro/external/postgresql/signature_summary.py
Expand Up @@ -51,6 +51,11 @@ def get(self, **kwargs):
]

params = external_common.parse_arguments(filters, kwargs)

# Decode double-encoded slashes in signature
if params["signature"] is not None:
params["signature"] = params["signature"].replace("%2F", "/")

if params['versions'] and params['report_type'] is not 'products':
glue = ','
version_search = ' AND reports_clean.product_version_id IN (%s)'
Expand Down
4 changes: 2 additions & 2 deletions webapp-php/application/models/signature_summary.php
Expand Up @@ -19,7 +19,7 @@ public function getSummary($report_type, $signature, $start, $end, $versions = a
$service = new Web_Service($config);
$host = Kohana::config('webserviceclient.socorro_hostname');
$report_type = rawurlencode($report_type);
$signature = rawurlencode($signature);
$signature = rawurlencode(str_replace('/', '%2F', $signature));\
$start_date = rawurlencode($start);
$end_date = rawurlencode($end);
$url = "{$host}/signaturesummary/report_type/{$report_type}/signature/{$signature}/start_date/{$start_date}/end_date/{$end_date}";
Expand All @@ -30,7 +30,7 @@ public function getSummary($report_type, $signature, $start, $end, $versions = a

if(isset($versions['versions']) && !empty($versions['versions'])) {
$url .= "/versions/{$versions['versions']}";
}
}

$resp = $service->get($url);

Expand Down

0 comments on commit 6df8779

Please sign in to comment.