YOURLS / YOURLS/YOURLS

Bookmarklets may fail on pages which title is a URL

Open
#1,672 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api bug
Dominant language
PHP
Stars
12.2k
Forks
2.1k
Avg merge
6h 15m
Merged PRs (30d)
7

Description

As seen in #1670 : if a document <title> is a URL, the bookmarklet will generate a &t=http://... which will make mod_security trip up

Possible fix would be to split the title like we did with the URL at any http: part but :

  • what if multiple 'http://' occurences?
  • is it multibyte safe? (is that a concern anyway?)
  • ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing how the bookmarklet builds its query parameters, then reproduce the case where the document title is a URL and inspect the generated &t= value. Done means URL titles no longer produce a request that triggers mod_security, with the multiple-URL and multibyte cases addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.