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

ArrayIndexOutOfBoundsException #4

Open
david0 opened this issue Apr 15, 2020 · 4 comments
Open

ArrayIndexOutOfBoundsException #4

david0 opened this issue Apr 15, 2020 · 4 comments

Comments

@david0
Copy link

david0 commented Apr 15, 2020

Sadly does not work for me:

./bin/maven-settings-decoder -f ~/.m2/settings.xml -s ~/.m2/settings-security.xml 
Master password is : <my username>
Exception in thread "main" org.sonatype.plexus.components.cipher.PlexusCipherException: java.lang.ArrayIndexOutOfBoundsException
	at org.sonatype.plexus.components.cipher.PBECipher.decrypt64(PBECipher.java:193)
	at org.sonatype.plexus.components.cipher.DefaultPlexusCipher.decrypt(DefaultPlexusCipher.java:72)
	at org.sonatype.plexus.components.cipher.DefaultPlexusCipher.decryptDecorated(DefaultPlexusCipher.java:89)
	at org.github.jelmerk.maven.settings.Decorder.decodePassword(Decorder.java:67)
	at org.github.jelmerk.maven.settings.Decorder.printPasswords(Decorder.java:109)
	at org.github.jelmerk.maven.settings.Decorder.main(Decorder.java:62)
Caused by: java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.sonatype.plexus.components.cipher.PBECipher.decrypt64(PBECipher.java:175)
	... 5 more
@jglick
Copy link

jglick commented Jun 11, 2020

Worked for me for many passwords, then crashed on one with

Exception in thread "main" org.sonatype.plexus.components.cipher.PlexusCipherException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 8 out of bounds for byte[6]
	at org.sonatype.plexus.components.cipher.PBECipher.decrypt64(PBECipher.java:193)
	at org.sonatype.plexus.components.cipher.DefaultPlexusCipher.decrypt(DefaultPlexusCipher.java:72)
	at org.sonatype.plexus.components.cipher.DefaultPlexusCipher.decryptDecorated(DefaultPlexusCipher.java:89)
	at org.github.jelmerk.maven.settings.Decorder.decodePassword(Decorder.java:67)
	at org.github.jelmerk.maven.settings.Decorder.printPasswords(Decorder.java:109)
	at org.github.jelmerk.maven.settings.Decorder.main(Decorder.java:62)
Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 8 out of bounds for byte[6]
	at java.base/java.lang.System.arraycopy(Native Method)
	at org.sonatype.plexus.components.cipher.PBECipher.decrypt64(PBECipher.java:175)
	... 5 more

@jelmerk
Copy link
Owner

jelmerk commented Jun 12, 2020

If you have something i can reproduce this with i can take a look

Though i guess given the nature of the files that may be tricky...

@jglick
Copy link

jglick commented Jun 16, 2020

I think it is just #2 actually.

@david0
Copy link
Author

david0 commented Jan 18, 2021

Just stumbled again over that. Unfortunatley its not easy to help you reproducing that, since I don't know how this password was created. Its not a plaintext password. https://github.com/ci-and-cd/maven-settings-decoder works for me btw.

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