Synergy-core: File path escape issue on Windows

Created on 28 Nov 2020  路  5Comments  路  Source: symless/synergy-core

Operating Systems and Software Version

Server: Windows 10 Pro 2004
Client; Windows 10 Home 2004
Both are running synergy 1.12.2-stable-a52ccb2d, build date November 12, 2020
Username (will be relevant later) is in the form of . So my user folder on windows is
C:\Users\<First> <Middle> <Last>. That is there are two spaces.

Problem

I'm running into a number of issues that revolved around the most recent version of synergy on windows is not properly escaping paths.

Problem 1

Each time I open synergy, both the server and the client error outs saying that
synergyc.exe: unrecognized option `<Middle Name>'. When I turn TLS encryption off and start the service again (by clicking the 1. clicking the stop button, 2. going to settings and turning the TLS encryption off, and 3. clicking the apply then start button) the service starts without issue.

I have also had success changing the certificate path to C:\synergy\Synergy.pem (same steps as before but instead in step 2 keeping TLS on but changing the file path for the certificate path).

Lastly, if I simply put quotes around the certificate path in the settings GUI, synergy works fine.

All of this would suggest that there is a file escape issue how the certificate path is being processed. Presumably it is being loaded and passed unescaped to synergys.exe which is erroring out because of the spaces in my username.

Problem 2

Each time I open synergy after fully closing it some of my settings are reset. Most importantly, the certificate path gets reset. This is even after hitting "apply" to save the settings.

This is particularly annoying because then each time I open synergy, I'm faced with problem 1 which I have to go through the steps of fixing again.

I have noticed that each time I click apply synergy says that it is saving it's config file in my C:\Users\<User Name>\AppData\Local\Temp folder each time in a new file. Looking in that folder, I see a ton of temporary synergy configuration files. Of note, none of them have the certificate path saved. Checking the registry at HKEY_CURRENT_USER\Software\Synergy\Synergy also shows that certificate path is not saved.

If I understand synergy correctly, it loads the configuration from registry on windows and saves it to the temp folder. Surprisingly there is no similar issue with file escaping when saving the configuration file.

I'm guessing this means that a) changing the certificate path is not saving correctly (maybe the above is symptomatic of another file escape issue) or b) the certificate path is simply not saved in the configuration file nor registry leading it to being reset when synergy restarts.

bug triage

All 5 comments

Jira Issue: SYNERGY-620

hi @sticke4 we have fixed this issues in 1.13.0, soon to be released

@alihaiderismail could you please check if the new version solves your problems?
https://symless.com/synergy/releases/synergy-1-13-release-candidate-2

Thanks,
Andrea

Excellent works great! Thanks so much.

Glad to heart!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martindale picture martindale  路  5Comments

jasonfisherjlf picture jasonfisherjlf  路  4Comments

xmstspider picture xmstspider  路  4Comments

jenelcohen picture jenelcohen  路  3Comments

nbolton picture nbolton  路  5Comments