#885 assigned defect

Ignore space or %20 in webapi URLs

Reported by: davidsarah Owned by: davidsarah
Priority: major Milestone: soon
Component: code-frontend-web Version: 1.5.0
Keywords: usability newurls Cc:
Launchpad Bug:

Description

When a wrapped URL is copied to the clipboard and then to a browser address bar, sometimes the copying application inserts spaces at the end of each line and the browser does not strip them. This would happen in some cases even if URLs were shorter (#882), since they can include a filename and parameters.

I think it is only spaces that get inserted, not tabs. The browser might convert these to %20 when it submits the URL, so stripping spaces should be done after %-decoding.

Note that this isn't a duplicate of #884 ('give nice error page when URL is mangled') because we need to both:

  • strip spaces, in order to eliminate one of the most common forms of mangling, and
  • display a nice error page for mangled URLs that we're unable to correct.

Change History (13)

comment:1 Changed at 2010-02-01T19:48:19Z by davidsarah

  • Milestone changed from undecided to 1.7.0

comment:2 follow-up: Changed at 2010-02-08T19:29:52Z by zooko

See related ticket #885 (automatically url-unquote caps).

comment:3 in reply to: ↑ 2 ; follow-up: Changed at 2010-02-09T00:05:21Z by davidsarah

Replying to zooko:

See related ticket #885 (automatically url-unquote caps).

That should be #942.

Yes, we should first %-decode and then strip spaces. I think it's sufficient to do that in uri.from_string. (As the IURI interface doc says, uri.from_string is supposed to be used instead of the *URI.init_from_string factory methods, and that stipulation appears to be followed everywhere apart from test code.)

comment:4 in reply to: ↑ 3 Changed at 2010-02-09T00:11:51Z by davidsarah

Replying to davidsarah:

(As the IURI interface doc says, uri.from_string is supposed to be used instead of the *URI.init_from_string factory methods, ...)

Incidentally, *URI.init_from_string are classmethods, so init_from_string shouldn't be part of the IURI interface.

comment:5 Changed at 2010-02-11T04:23:38Z by davidsarah

#496 was a duplicate. It gave this link to a user report: http://allmydata.org/pipermail/tahoe-dev/2008-July/000721.html (although I disagree with the opinion in that post that only the WUI should strip spaces; I think it should be done for all webapi URLs).

As mentioned in ticket:496#comment:1, if the URL was modified then we should do a permanent redirect. This is similar to the redirect that we currently do for ?uri= (tested here, although I don't see where it's implemented).

comment:6 Changed at 2010-02-15T20:10:12Z by davidsarah

  • Milestone changed from 1.7.0 to 1.6.1

comment:7 Changed at 2010-02-15T20:16:57Z by davidsarah

  • Milestone changed from 1.6.1 to 1.7.0

On second thoughts, this doesn't need to be done for 1.6.1.

comment:8 Changed at 2010-04-12T19:27:17Z by davidsarah

  • Owner set to davidsarah
  • Status changed from new to assigned

comment:9 Changed at 2010-06-12T20:58:41Z by davidsarah

  • Milestone changed from 1.7.0 to 1.7.1

comment:10 Changed at 2010-07-17T04:17:23Z by davidsarah

  • Milestone changed from 1.7.1 to 1.8β

comment:11 Changed at 2010-07-17T04:20:08Z by davidsarah

  • Milestone changed from 1.8β to 1.8.0

comment:12 Changed at 2010-08-08T05:33:36Z by davidsarah

  • Milestone changed from 1.8.0 to soon

comment:13 Changed at 2011-08-15T04:24:13Z by davidsarah

  • Milestone changed from soon to 1.10.0
Note: See TracTickets for help on using tickets.