Skip to content

Release 0.66.11#3315

Closed
odlbot wants to merge 2 commits into
releasefrom
release-candidate
Closed

Release 0.66.11#3315
odlbot wants to merge 2 commits into
releasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented May 8, 2026

Zaman Afzal

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

>
<a
class="button-a button-a-primary"
href="{{ APP_BASE_URL }}/dashboard"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The dashboard URL in the welcome email is built by concatenating {{ APP_BASE_URL }} and /dashboard, which can create a double-slash if APP_BASE_URL has a trailing slash.
Severity: MEDIUM

Suggested Fix

Use the urljoin filter from Django's future template tags to correctly join the URL parts. Alternatively, strip the trailing slash from APP_BASE_URL before it is passed to the template context in profiles/utils.py, for example by using settings.APP_BASE_URL.rstrip('/').

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: main/templates/email/welcome_email.html#L77

Potential issue: The welcome email template at `main/templates/email/welcome_email.html`
constructs the dashboard URL as `{{ APP_BASE_URL }}/dashboard`. When the `APP_BASE_URL`
setting is configured with a trailing slash (e.g., `https://learn.mit.edu/`), this
results in a URL with a double slash, like `https://learn.mit.edu//dashboard`. While
many web servers tolerate this, stricter server configurations might interpret this as a
malformed path, leading to a 404 error or an incorrect redirect. This could break the
primary call-to-action link for all new users receiving the welcome email. Other parts
of the codebase handle this by stripping the trailing slash, but this template omits
that step.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants