Skip to content

Commit

Permalink
PISTON-523: urlencode prompt ID to avoid splitting it wrong (2600hz#4515
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danielfinke authored and lazedo committed Jan 30, 2018
1 parent 538e282 commit 3e90145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/kazoo_media/src/kz_media_file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ get_uri(#media_store_path{}=Store, JObj) ->
maybe_proxy(JObj, Store);
get_uri(Media, JObj) when is_binary(Media) ->
kz_util:put_callid(JObj),
Paths = [Path
Paths = [kz_http_util:urldecode(Path)
|| Path <- binary:split(Media, <<"/">>, ['global', 'trim']),
not kz_term:is_empty(Path)
],
Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_media/src/kz_media_map.erl
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ maybe_add_prompt(AccountId, JObj, PromptId) ->
lager:debug("adding language ~s for prompt ~s to map for ~s", [Lang, PromptId, AccountId]),
Languages = kz_json:set_value(Lang
,kz_media_util:prompt_path(kz_doc:account_id(JObj, ?KZ_MEDIA_DB)
,kz_doc:id(JObj)
,kz_http_util:urlencode(kz_doc:id(JObj))
)
,Langs
),
Expand Down

0 comments on commit 3e90145

Please sign in to comment.