@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Drop Windows-specific escaping in preallocated host

Summary: This drops the Windows-specific escaping code for the creation of directories when acquiring a lease. This is basically the change from D10378 without the other, no longer necessary changes.

Test Plan: This code hasn't been run in a production environment for a while (any instances of Phabricator using Drydock / Harbormaster with Windows have had this code removed by the D10378 patch for a while).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Projects: #drydock

Differential Revision: https://secure.phabricator.com/D13341

J Rhodes 70a82017 827aa05a

+1 -14
+1 -14
src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
··· 77 77 78 78 $cmd = $lease->getInterface('command'); 79 79 80 - if ($v_platform !== 'windows') { 81 - $cmd->execx('mkdir %s', $full_path); 82 - } else { 83 - // Windows is terrible. The mkdir command doesn't even support putting 84 - // the path in quotes. IN QUOTES. ARGUHRGHUGHHGG!! Do some terribly 85 - // inaccurate sanity checking since we can't safely escape the path. 86 - if (preg_match('/^[A-Z]\\:\\\\[a-zA-Z0-9\\\\\\ ]/', $full_path) === 0) { 87 - throw new Exception( 88 - pht( 89 - 'Unsafe path detected for Windows platform: "%s".', 90 - $full_path)); 91 - } 92 - $cmd->execx('mkdir %C', $full_path); 93 - } 80 + $cmd->execx('mkdir %s', $full_path); 94 81 95 82 $lease->setAttribute('path', $full_path); 96 83 }