Page MenuHomeSchine - Phabricator

Launcher | Add path sanitization
Confirmed task for development, LowPublic

Description

NodeJS does not offer path sanitizing or validating methods, with its default resolve/normalize path methods happily allowing invalid characters such as :*?"|<>

Any approach to this must also correctly handle paths on POSIX systems (OSX, linux, bsd, etc.)

Special characters used in the folder path relative to the launcher makes it also not startup the launcher at all. Characters like # and %

C:\Users\username\Desktop\Voxel Games\Starmade - Weapons Update Testing #2\starmade-launcher-win32-x64>starmade-launcher.exe --verbose
[8936:0422/142918:INFO:CONSOLE(0)] Set appData  cache path to: C:\Users\username\Desktop\Voxel Games\Starmade - Weapons Update Testing #2\starmade-launcher-win32-x64\.cache
[8936:0422/142918:INFO:CONSOLE(0)] Set userData cache path to: C:\Users\username\Desktop\Voxel Games\Starmade - Weapons Update Testing #2\starmade-launcher-win32-x64\.cache\userData
[8936:0422/142918:INFO:CONSOLE(0)] Sun Apr 22 2018 14:29:18 GMT-0500 (Central Daylight Time)
[8936:0422/142918:INFO:CONSOLE(0)]    (meta)      Opened log file for writing.
[8936:0422/142918:INFO:CONSOLE(0)] Logging level: verbose (10)
[8936:0422/142918:INFO:CONSOLE(0)]     event      App ready
[9916:0422/142918:INFO:renderer_main.cc(200)] Renderer process started

Details

Commits
Restricted Diffusion Commit
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Launcher
Reproducible
Yes
Last tested (version)
158 fe18f38
Category
Launcher
Hardware/Software/System
OS-Specific
No
Hardware-Specific
No
Video Card Vendor
uncertain
Steps to reproduce
  1. Open the build type popup
  2. enter an invalid install path
  3. click save
Tester information (Internal use only)

OK... putting back in queue as it seems that the initial path settup isnt catching the illegal characters in the same way as the input from the options menu does.

sample from Xarxes:

/home/andreww/Downloads/starmade-launcher-linux-x64/Star"!@#$%^&*()<>:?'Made

When same string is saved inside the launcher

/home/andreww/Downloads/starmade-launcher-linux-x64/Star!@#$%^&()'Made

Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>

Event Timeline

calani created this task.Jul 18 2016, 10:44 PM
calani moved this task from Backlog / Unclassed to Active on the Launcher Development board.
calani added a commit: Restricted Diffusion Commit.Jul 26 2016, 2:13 AM
calani changed the task status from In Queue (Launcher) to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed Launcher Development. · View Herald TranscriptJul 26 2016, 2:13 AM
calani added a commit: Restricted Diffusion Commit.Jul 26 2016, 2:13 AM

The update sanitizes each foldername in turn, stripping out invalid characters.

This may cause problems with unexpected characters (e.g. unicode) in the path, which may be legal on some OS's.

SmilingDemon changed Last tested (version) from v2.0.8 / build 152 to 158 fe18f38 .Aug 2 2016, 8:12 AM
SmilingDemon changed Category from none/unspecified to Launcher.
SmilingDemon edited Serverconfig (server.cfg). (Show Details)
SmilingDemon edited Clientconfig (settings.cfg). (Show Details)
SmilingDemon added a subscriber: SmilingDemon.EditedAug 2 2016, 10:05 AM

-QA Testing-

did look good on Win 7, initial setup or changing in options had same effect

xarses added a subscriber: xarses.EditedAug 3 2016, 6:39 AM

Linux64:
When updating from the first time selection, all characters are accepted and not converted to spaces

/home/andreww/Downloads/starmade-launcher-linux-x64/Star"!@#$%^&*()<>:?'Made

When same string is saved inside the launcher

/home/andreww/Downloads/starmade-launcher-linux-x64/Star!@#$%^&()'Made
SmilingDemon changed the task status from Resolved to In Queue (Launcher).Aug 3 2016, 7:16 AM

OK... putting back in queue as it seems that the initial path settup isnt catching the illegal characters in the same way as the input from the options menu does.

sample from Xarxes:

/home/andreww/Downloads/starmade-launcher-linux-x64/Star"!@#$%^&*()<>:?'Made

When same string is saved inside the launcher

/home/andreww/Downloads/starmade-launcher-linux-x64/Star!@#$%^&()'Made

Restricted Application edited projects, added Launcher Development; removed Quality Assurance. · View Herald TranscriptAug 3 2016, 7:16 AM
SmilingDemon edited Tester information (Internal use only). (Show Details)Aug 3 2016, 7:16 AM
calani renamed this task from Add path sanitization to build type popup to Add path sanitization.Sep 22 2016, 9:02 PM
calani lowered the priority of this task from Normal to Low.
AndyP changed the task status from In Queue (Launcher) to In Queue.Mar 10 2017, 5:21 PM
lancake updated the task description. (Show Details)Apr 22 2018, 7:58 PM
lancake edited Steps to reproduce. (Show Details)
lancake updated the task description. (Show Details)Apr 22 2018, 8:36 PM