Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility of password protected files linux vs windows version #16

Closed
GoogleCodeExporter opened this issue Mar 22, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create password protected file ( sqlite or xml ) in linux version of program
2. Try to open this file in windows verion of program
3. Et vice versa

What is the expected output? What do you see instead?
File must be opened after password was typed , but there's always "wrong 
password" in result 

What version of the product are you using? On what operating system?
0.32 and 0.35 linux and windows 

Please provide any additional information below.


Original issue reported on code.google.com by xmax...@gmail.com on 8 Dec 2014 at 7:50

@GoogleCodeExporter
Copy link
Author

I cannot confirm this bug, you have to provide a valid password example for me 
to reproduce, it may be some particular password character(s) that cause the 
problem.

I'm using the same password protected document in linux and windows and never 
had this problem.

Original comment by giuspen@gmail.com on 14 Dec 2014 at 11:48

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Original comment by giuspen@gmail.com on 14 Dec 2014 at 11:48

@ghost
Copy link

ghost commented Apr 4, 2016

I have the same problem: I worked only on Ubuntu until now, I migrated for a few months on Windows but my .ctx won't open. I opened it in Ubuntu and Save As... unprotected .ctb then on Windows I reSaved .ctd to .ctx.

I haven't tested if the new .ctx file created on Windows works on Ubuntu (I am lazy).

@giuspen
Copy link
Owner

giuspen commented Apr 4, 2016

Hi, the problem is related to specific chars in the password and the linux
vs windows terminal/shell. Can you try to spot what char/chars are not
cross platform and let me know?
On 4 Apr 2016 12:32, "moldcraft" notifications@github.com wrote:

I have the same problem: I worked only on Ubuntu until now, I migrated for
a few months on Windows but my .ctx won't open. I opened it in Ubuntu and Save
As... unprotected .ctb then on Windows I reSaved .ctd to .ctx.

I haven't tested if the new .ctx file created on Windows works on Ubuntu
(I am lazy).


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#16 (comment)

@ghost
Copy link

ghost commented Apr 4, 2016

lower/upper case letters, numbers and only this ^ special character. e.g.: he11^W^R1D

@ghost
Copy link

ghost commented Apr 4, 2016

Now I tried to open in Ubuntu the .ctx created on Windows and it says the pass is wrong

@giuspen
Copy link
Owner

giuspen commented Apr 9, 2016

I can see the problem thank you. I'm going to ban the caret char from the passwords in the next versions

@ghost
Copy link

ghost commented May 3, 2016

I removed the ^ character from password and now I can open the file on Windows and Linux.

Thank you!

P.S. Can you explain please why it happens?

@giuspen
Copy link
Owner

giuspen commented May 3, 2016

That's because it's a special character in Windows command line, see
http://www.pcmech.com/article/use-the-carat-to-escape-characters-in-the-command-prompt-and-batch-files/
On 3 May 2016 08:15, "moldcraft" notifications@github.com wrote:

I removed the ^ character from password and now I can open the file on
Windows and Linux.

Thank you!

P.S. Can you explain please why it happens?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#16 (comment)

@ghost
Copy link

ghost commented May 3, 2016

Better you should escape special characters on windows instead of blacklisting characters

@giuspen
Copy link
Owner

giuspen commented May 3, 2016

You're right, when I started I just picked the quickest solution. If you
could implement the fix yourself, test on both linux and windows and create
a pull request that would be of great help.
On 3 May 2016 14:51, "moldcraft" notifications@github.com wrote:

Better you should escape special characters
http://www.robvanderwoude.com/escapechars.php on windows instead of
blacklisting characters


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#16 (comment)

@ghost
Copy link

ghost commented May 3, 2016

Ok, I will try.

So the escape must be done only in 2 places, on save and open?

@giuspen
Copy link
Owner

giuspen commented May 3, 2016

Correct, thank you for your help!
On 3 May 2016 15:38, "moldcraft" notifications@github.com wrote:

Ok, I will try.

So the escape must be done only in 2 places, on save

bash_str = '%s a -p%s -w%s -bd -y %s %s' % (cons.SZA_PATH,

and open
bash_str = '%s e -p%s -w%s -bd -y -o%s %s' % (cons.SZA_PATH,

?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#16 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants