Page MenuHomePhabricator

Tokenize external editor links so they can be safely materialized on the client
ClosedPublic

Authored by epriestley on Apr 18 2020, 9:31 PM.
Tags
None
Referenced Files
F13106693: D21143.diff
Sat, Apr 27, 8:55 PM
Unknown Object (File)
Wed, Apr 3, 3:55 AM
Unknown Object (File)
Wed, Apr 3, 3:55 AM
Unknown Object (File)
Mon, Apr 1, 12:35 AM
Unknown Object (File)
Fri, Mar 29, 3:31 PM
Unknown Object (File)
Mar 21 2024, 10:33 AM
Unknown Object (File)
Feb 7 2024, 3:09 PM
Unknown Object (File)
Feb 5 2024, 3:57 AM
Subscribers
None

Details

Summary

Ref T13515. Currently, opening a file to a particular line in an external editor relies on replacing "%l" with "%l" (which is escaped as "%25l") on the server, and then replacing "%25l" with the line number on the client. This will fail if the file path (or any other variable) contains "%l" in its unencoded form.

The parser also can't identify invalid variables.

Pull the parser out, formalize it, and make it generate an intermediate representation which can be sent to the client and reconstituted.

(This temporarily breaks Diffusion and permanently removes the weird, ancient integration in Dark Console.)

Test Plan
  • Added a bunch of tests for the actual parser.
  • Used "Open in Editor" in Differential.

Diff Detail

Repository
rP Phabricator
Branch
sticky7
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/diffusion/controller/DiffusionBrowseController.php:481XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 24158
Build 33271: Run Core Tests
Build 33270: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2020, 4:02 PM
This revision was automatically updated to reflect the committed changes.