URL-encode Giphy search phrase before building request URL #21

Closed
opened 2026-02-20 06:49:10 +00:00 by cal · 2 comments
Owner

Description

services/giphy_service.py:192 and :253 — The Giphy API request URL is built as f"{self.translate_url}?s={phrase}&api_key={self.api_key}". If any phrase contains spaces, &, or +, the URL is malformed. Currently the phrases are internal constants so immediate risk is low, but it is fragile.

File Locations

  • services/giphy_service.py:192
  • services/giphy_service.py:253

Labels

bug, tech-debt

Priority

medium

## Description `services/giphy_service.py:192` and `:253` — The Giphy API request URL is built as `f"{self.translate_url}?s={phrase}&api_key={self.api_key}"`. If any phrase contains spaces, `&`, or `+`, the URL is malformed. Currently the phrases are internal constants so immediate risk is low, but it is fragile. ## File Locations - `services/giphy_service.py:192` - `services/giphy_service.py:253` ## Labels bug, tech-debt ## Priority medium
Author
Owner

Addressed in commit f4be20a on next-release branch. Will be closed when merged to main.

Addressed in commit f4be20a on `next-release` branch. Will be closed when merged to main.
Author
Owner

Addressed in commit f4be20a on next-release branch. Will be closed when merged to main.

Addressed in commit `f4be20a` on `next-release` branch. Will be closed when merged to main.
cal closed this issue 2026-02-20 20:29:06 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-v2#21
No description provided.