Массовое назначение: небезопасная конфигурация подшивки (ошибка Fortify) после добавления аннотации @JsonProperty - PullRequest
0 голосов
/ 13 ноября 2018

Я получаю Массовое назначение: небезопасная конфигурация связующего в анализе фортификации.

Вот AuthorisationController.class

@Controller
public class AuthorisationController {

    @RequestMapping(value = "/authorisation_request", method = RequestMethod.POST,
                produces = MediaType.APPLICATION_JSON_VALUE)
        @ResponseBody
        public ResponseEntity<AuthorisationRequest> createAuthorisation(HttpServletRequest request,
                @RequestBody AuthorisationRequestInfo createAuthorisation) {
        //processing code
    }
}

Вот класс AuthorisationRequestInfo.class, в который будут отображаться параметры http-запроса.

import com.fasterxml.jackson.annotation.JsonProperty;

public class OrderAuthorisationRequestInfo {


private String hashValue;
private String expiryDateTime;
private Integer initiatingRolePlayerId;

@JsonProperty("feedbackURI")
private String feedbackUri;

/**
 * Gets the hash value.
 *
 * @return the hash value
 */
public String getHashValue() {
    return hashValue;
}

/**
 * Sets the hash value.
 *
 * @param hashValue the new hash value
 */
public void setHashValue(String hashValue) {
    this.hashValue = hashValue;
}

/**
 * Gets the expiry date time.
 *
 * @return the expiry date time
 */
public String getExpiryDateTime() {
    return expiryDateTime;
}

/**
 * Sets the expiry date time.
 *
 * @param expiryDateTime the new expiry date time
 */
public void setExpiryDateTime(String expiryDateTime) {
    this.expiryDateTime = expiryDateTime;
}

/**
 * Gets the initiating role player id.
 *
 * @return the initiating role player id
 */
public Integer getInitiatingRolePlayerId() {
    return initiatingRolePlayerId;
}

/**
 * Sets the initiating role player id.
 *
 * @param initiatingRolePlayerId the new initiating role player id
 */
public void setInitiatingRolePlayerId(Integer initiatingRolePlayerId) {
    this.initiatingRolePlayerId = initiatingRolePlayerId;
}

/**
 * Gets the feedback URI.
 *
 * @return the feedback URI
 */
public String getFeedbackUri() {
    return feedbackUri;
}

/**
 * Sets the feedback URI.
 *
 * @param feedbackUri the new feedback URI
 */
public void setFeedbackUri(String feedbackUri) {
    this.feedbackUri = feedbackUri;
}
}

Интересно то, что я только начал получать эту ошибку после добавления аннотации @JsonProperty ("feedbackURI") в столбце feedbackUri.

@ InitBinder ранее не использовался, и не было ошибки фортификации, и все параметры в запросе являются обязательными.

Все остальные API-интерфейсы в порядке и не сообщают о проблемах с укреплением. Только этот API и еще один, в который был добавлен @JsonProperty, начали показывать эту ошибку.

Fortify Issue Image

Буду признателен за любую помощь.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...