diff --git a/src/main/java/org/prebid/server/auction/requestfactory/AmpRequestFactory.java b/src/main/java/org/prebid/server/auction/requestfactory/AmpRequestFactory.java index 55f0d2b3729..21598e97673 100644 --- a/src/main/java/org/prebid/server/auction/requestfactory/AmpRequestFactory.java +++ b/src/main/java/org/prebid/server/auction/requestfactory/AmpRequestFactory.java @@ -183,8 +183,6 @@ private Future parseBidRequest(HttpRequestContext httpRequest, Aucti .ext(createExt(httpRequest, tagId, debug)) .build(); - validateOriginalBidRequest(bidRequest, consentString, auctionContext); - return Future.succeededFuture(bidRequest); } @@ -315,30 +313,6 @@ private static Map ampDataFromQueryString(HttpRequestContext htt .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (value1, value2) -> value1)); } - private static void validateOriginalBidRequest( - BidRequest bidRequest, - String requestConsentString, - AuctionContext auctionContext) { - - final User user = bidRequest.getUser(); - final ExtUser extUser = user != null ? user.getExt() : null; - final String gdprConsentString = extUser != null ? extUser.getConsent() : null; - - final Regs regs = bidRequest.getRegs(); - final ExtRegs extRegs = regs != null ? regs.getExt() : null; - final String usPrivacy = extRegs != null ? extRegs.getUsPrivacy() : null; - - if (StringUtils.isAllBlank(gdprConsentString, usPrivacy)) { - final String message = String.format( - "Amp request parameter %s or %s have invalid format: %s", - CONSENT_PARAM, - GDPR_CONSENT_PARAM, - requestConsentString); - logger.debug(message); - auctionContext.getPrebidErrors().add(message); - } - } - /** * Creates {@link BidRequest} and sets properties which were not set explicitly by the client, but can be * updated by values derived from headers and other request attributes. diff --git a/src/test/java/org/prebid/server/auction/requestfactory/AmpRequestFactoryTest.java b/src/test/java/org/prebid/server/auction/requestfactory/AmpRequestFactoryTest.java index cba43b99985..6da5561f4c1 100644 --- a/src/test/java/org/prebid/server/auction/requestfactory/AmpRequestFactoryTest.java +++ b/src/test/java/org/prebid/server/auction/requestfactory/AmpRequestFactoryTest.java @@ -1309,21 +1309,6 @@ public void shouldReturnBidRequestWithoutUserWhenGdprConsentQueryParamIsInvalid( assertThat(result.getUser()).isNull(); } - @Test - public void shouldAddErrorToAuctionContextWhenGdprConsentQueryParamIsInvalid() { - // given - routingContext.queryParams().add("gdpr_consent", "consent-value"); - - givenBidRequest(); - - // when - final AuctionContext result = target.fromRequest(routingContext, 0L).result(); - - // then - assertThat(result.getPrebidErrors()) - .contains("Amp request parameter consent_string or gdpr_consent have invalid format: consent-value"); - } - @Test public void shouldReturnBidRequestWithExtPrebidDataBiddersUpdatedByFpdResolver() throws JsonProcessingException { // given