Permalink
Browse files

NXCM-5188: Checksum policy set to IGNORE for prefix requests

As the transport integrity here has small chances to slip in
as prefix file will be processed, and hence, checked/validated
  • Loading branch information...
1 parent 487396b commit 3deebb41c8d6b27a3b45a0f901e7648ccb8fee13 @cstamas cstamas committed Apr 9, 2013
View
10 ...c/main/java/org/sonatype/nexus/proxy/maven/routing/internal/RemotePrefixFileStrategy.java
@@ -125,7 +125,7 @@ public StrategyResult discover( final MavenProxyRepository mavenProxyRepository
if ( prefixFileAgeInDays < 1 )
{
return new StrategyResult( "Remote publishes prefix file (is less than a day old), using it.",
- prefixSource, true );
+ prefixSource, true );
}
else
{
@@ -150,12 +150,8 @@ protected StorageFileItem retrieveFromRemoteIfExists( final MavenProxyRepository
final ResourceStoreRequest request = new ResourceStoreRequest( path );
request.setRequestRemoteOnly( true );
request.getRequestContext().put( Manager.ROUTING_INITIATED_FILE_OPERATION_FLAG_KEY, Boolean.TRUE );
- if ( ChecksumPolicy.STRICT == mavenProxyRepository.getChecksumPolicy() )
- {
- // NXCM-5188: Relax checksum policy for prefix file request, if needed
- request.getRequestContext().put( ChecksumPolicy.REQUEST_CHECKSUM_POLICY_KEY,
- ChecksumPolicy.STRICT_IF_EXISTS );
- }
+ // NXCM-5188: Disable checksum policy for prefix file request, it will be processed and checked anyway
+ request.getRequestContext().put( ChecksumPolicy.REQUEST_CHECKSUM_POLICY_KEY, ChecksumPolicy.IGNORE );
// check for remote presence, as fetching with setRequestRemoteOnly has a side effect of
// DELETING the file from local cache if not present remotely. In this case, prefix

0 comments on commit 3deebb4

Please sign in to comment.