Skip to content

add signed url support - #21

Merged
akbansa merged 3 commits into
masterfrom
add-additional-thing
Oct 5, 2026
Merged

akbansa merged 3 commits into
masterfrom
add-additional-thing

Conversation

@akbansa

@akbansa akbansa commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@akbansa
akbansa requested a balanced review from Copilot October 5, 2026 08:44
@akbansa akbansa self-assigned this Oct 5, 2026
@akbansa akbansa changed the title Add additional thing add signed url support Oct 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Signed mode breaks picture sources and can generate invalid signatures in CSS or JavaScript contexts.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Adds experimental Gumlet signed URL support with optional expiry and disables client-side resizing when enabled.

Changes:

  • Adds URL signing and server-side image rewriting.
  • Adds configuration controls, warnings, and documentation.
  • Bumps the plugin version to 1.4.5.
File Description
README.md Documents signed URL setup and behavior.
readme.txt Updates features, FAQ, and release notes.
changelog.txt Adds the 1.4.5 changelog.
gumlet.php Bumps version and loads signing helpers.
includes/​options-page.php Adds signed URL settings and warnings.
includes/​gumlet-sign-url.php Implements signature and query helpers.
includes/​class-gumlet.php Integrates signing into image rewriting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread includes/class-gumlet.php
Comment on lines +251 to +252
if (!empty($this->options['signed_urls'])) {
return false;
Comment thread includes/class-gumlet.php Outdated
Comment on lines +382 to +387
$query = parse_url($raw, PHP_URL_QUERY);
if (is_string($query) && preg_match('/(?:^|&)s=/', $query)) {
return $match[0];
}

$signed = $this->replace_image_url($raw);
Comment thread includes/class-gumlet.php
return $match[0];
}

return str_replace('&', '&', $signed);
@akbansa

akbansa commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot review again

Copilot AI commented Oct 5, 2026

Copy link
Copy Markdown

@copilot review again

Review found one issue: includes/class-gumlet.php:437 splits srcset on every comma, corrupting valid data-URL candidates such as data:image/png;base64,AAAA 1x when Auto Resize is off. Parse candidates without splitting commas inside URLs.

@akbansa
akbansa merged commit 64ada4f into master Oct 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants