Page MenuHomePhabricator

Allow uri.allowed-protocols to be configured in the Phacility cluster
Open, LowPublic

Assigned To
None
Authored By
swisspol
Jan 14 2016, 7:36 PM
Referenced Files
F1062655: pasted_file
Jan 17 2016, 3:12 PM
F1062652: pasted_file
Jan 17 2016, 3:12 PM
F1061512: step3.png
Jan 14 2016, 9:35 PM
F1061508: step1.png
Jan 14 2016, 9:35 PM
F1061510: step2.png
Jan 14 2016, 9:35 PM

Description

It would be useful to have remarkup, at least in Phriction, be able to recognize and turn into links custom URL schemes. Example use cases:

  • iOS OTA install links: itms-services://?action=download-manifest&url=https://...
  • iOS app links:
    • <a href="fb://profile/23050834961">Facebook</a>
    • <a href="twitter://user?screen_name=NHLBruins">Twitter</a>
    • <a href="instagram://user?username=nhlbruins">Instagram</a>
  • Corporate intranet links

That or allow raw HTML link tags in remarkup i.e. <a href="foo://bar">My Link</a>.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

See uri.allowed-protocols in Config.

Ah. I searched for something like this in config but forgot about the /config/all/ page.

Anyway, cannot be edited if hosted on Phacility :( Any chance you could add itms-services:// and hyper:// to the hyper instance? Thanks.

This task should be closed, no?

Oh, I'll make this editable in the cluster from the instances panel. Change will go out on Saturday morning (about 36 hours from now).

epriestley added a revision: Restricted Differential Revision.Jan 14 2016, 9:31 PM

I'm not sure what you mean by "from the instance panel"? Is it the instance's regular config page?

epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Jan 14 2016, 9:36 PM
epriestley added a commit: Restricted Diffusion Commit.

What's the format for setting? I tried ["http","https","mailto","hyper"] but it didn't work and actually breaks all links.

{ "http": true, "https": true, "mailto": true, "tel": true }

Still doesn't seem to work: all links are broken in Phriction:

pasted_file (45×607 px, 9 KB)

I changed that 10 mn ago.

Also the wiki page previews don't seem to render anymore:

pasted_file (109×286 px, 3 KB)

It just hangs on this. There's no error in the Chrome console or any failing HTTP requests as far as I can tell.

Ah and when I attempt to save the doc, I get this error:

Unhandled Exception ("InvalidArgumentException")

Argument 1 passed to idx() must be of the type array, object given, called in /core/lib/libphutil/src/markup/engine/remarkup/markuprule/PhutilRemarkupHyperlinkRule.php on line 40 and defined

If I switch the setting to ["http","https","mailto","hyper","itms-services"], then the exception is gone. So I guess the format is a JSON array, not object. But like I said above, hyperlinks don't work at all.

epriestley renamed this task from Add config settings to define custom URL schemes for remarkup to Allow uri.allowed-protocols to be configured in the Phacility cluster.Jan 17 2016, 3:50 PM
epriestley reopened this task as Open.
epriestley triaged this task as Low priority.
epriestley added a project: Phacility.
epriestley added a revision: Restricted Differential Revision.Feb 25 2016, 4:42 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 26 2016, 2:22 PM
epriestley added a revision: Restricted Differential Revision.Nov 30 2017, 12:34 PM
epriestley added a commit: Restricted Diffusion Commit.Nov 30 2017, 7:04 PM