Extra OpenVPN Options dialog changes input

Got a problem with Viscosity or need help? Ask here!

viscogrem

Posts: 12
Joined: Tue Feb 23, 2016 9:06 pm

Post by viscogrem » Tue Feb 23, 2016 11:29 pm
While playing with static-challenge I experienced a couple of error messages that didn't make sense until I realized, that the Extra OpenVPN Options dialog (Connections -> Edit -> Advanced) changes double quotation marks as well as single quotation marks to special UTF-8 version like a word processor would. This breaks configurations.

Example:
Code: Select all
static-challenge "Enter OTP:" 0 becomes static-challenge “Enter OTP:” 0
static-challenge 'Enter OTP:' 0 becomes static-challenge ‘Enter OTP:’ 0
The error message on connect depends on the exact text, either invalid special characters are printed in the label of the static challenge dialog or the configuration won't parse and OpenVPN dies (immediate disconnect).

Workaround:
Copy & paste from an external editor into that box or edit ~/Library/Application Support/Viscosity/OpenVPN/?/config.conf directly while Viscosity isn't running.

Solution:
Change input field to not alter user input.

Cheers,
Michael

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Thu Feb 25, 2016 5:31 pm
Hi Michael,

Thanks for the report. We've done some investigation, and Viscosity itself isn't doing this, by rather OS X is automatically doing quote substitution as you type. It must be a recent change, as we're not seeing it with older OS X versions. Basically as you type it'll replace the quote with a "smart" version.

We should be able to override this behaviour for the text field, so please expect the next beta and release updates to have a solution for this. In the meantime copy-pasting commands with quotes in them appears to work fine, or typing the quote character while holding down the "Control" key on the keyboard (which disables the smart behaviour).

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

viscogrem

Posts: 12
Joined: Tue Feb 23, 2016 9:06 pm

Post by viscogrem » Thu Feb 25, 2016 10:56 pm
Hi James,

It looks like 1.6.2b disabled smart behaviour in this input field, thank you!

- Michael
3 posts Page 1 of 1