sonatype / nexus-ruby-support

26 stars 7 forks source link

NEXUS-5863: Attribute recursion fix #42

Closed cstamas closed 11 years ago

cstamas commented 11 years ago

Attribute recursion caused by OS native path separator. Nexus, while (sadly) does not enforce/validate this, is strict regarding paths and used path separators.

org.sonatype.nexus.proxy.item.RepositoryItemUid.PATH_SEPARATOR

Is the only separator it "recognizes" in any path occurrence.

This change fixed a "OS separator leak" occurring when Nexus runs on Win OSes. In general, these constructs (passing in java.io.File path directly to Nx path) should be avoided.

Issue: https://issues.sonatype.org/browse/NEXUS-5863

mkristian commented 11 years ago

from your comment it feels like the patch with PATH_SEPARATOR should be done inside the RungemsFile class since that get used here and there.

anyways thanx for the patch ;)

eehret commented 11 years ago

Thanks @cstamas !

cstamas commented 11 years ago

@mkristian Probably yes. I just traced the problem here, as from the @eehret gist it was apparent that Win backslashes are "coming in" somehow, and I do know Nx Pro works just fine on Win OS, so it had to be something in this plugin :)