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

Filename generated on ubuntu and commited can not be created on windows (git clone) #65

Closed
christian-weiss opened this issue Dec 21, 2018 · 7 comments · Fixed by #84 or #100
Closed

Comments

@christian-weiss
Copy link

Import of following snippet from a keypass2 xml file:

<Group>
...
<Entry>
<String>
<Key>Title</Key>
<Value>MySQL  	web400_db2 </Value>
</String>
</Entry>
...
</Group>

Hex representation of Value:

4D 79 53 51 4C 20 20 09 77 65 62 32 30 30 5F 64 62 32 20

results in following file:

ls -al
-rw------- 1 christian christian  521 Dez 21 16:07 'MySQL__'$'\t''web400_db2_.gpg'

this part of the filename results in file creation problems on windows:

'$'\t''
@christian-weiss
Copy link
Author

this was discovered while testing your change from:
#55
#56

@roddhjav
Copy link
Owner

Hi, this is because pass-import only import the attached file name, not the actual binary content. As you can see in #68, this is being developed.

@christian-weiss
Copy link
Author

Please re-open this issue due to:
#97

Statement is (on Ubuntu):
pass import --convert --all keepass zusammengefasst.xml

Followed by (on windows):
git clone http://gitlab.fritz.box/myname/passwordstore-bugtester

git prints this error:

error: unable to create file /my/path/MySQL     web200_db2.gpg: invalid argument

Ubuntu system:
Ubuntu 19.10
pass 1.7.3
pass import 2.6
keypass xml from keepass 2.38
git version 2.20.1

Windows system:
Windows 10 64-bit
git bash (Git for Windows): GNU bash, version 4.4.19(2)-release (x86_64-pc-msys)

@roddhjav
Copy link
Owner

roddhjav commented Mar 2, 2020

You need to use both the --clean and the --convert options for this.

@christian-weiss
Copy link
Author

christian-weiss commented Mar 3, 2020

pass import --help
[...]
  -c, --clean           Make the paths more command line friendly.
  -C, --convert         Convert invalid caracters present in the paths.
[...]

Expectation:
As above filename is invalid, i expect that the issue is solved by --convert. The option --clean is just to make the filename more convenient when working with the command line.

Please move or copy this specific behaviour to --convert.

BTW: There is a typo: "caracters" should be "characters". I saw this typo on many places in the code and documentation incl. github release notes.

@roddhjav
Copy link
Owner

roddhjav commented Mar 12, 2020

You are right, the option name are not really good. I will definitely rewrite this.
In practice, the only difference between the two options is that the convert option replaces characters by the separator while the clean option replaces the characters by something else.

@christian-weiss
Copy link
Author

@roddhjav would be cool if you can re-open this ticket, as long as it is not implemented / resolved.

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

Successfully merging a pull request may close this issue.

2 participants