Mass Assignment: Insecure Binder Configuration (Fortify Error) after adding @JsonProperty Annotation










0















I am getting Mass Assignment: Insecure Binder Configuration in fortify analysis.



Here is the 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




Here is the AuthorisationRequestInfo.class on which the http request params will be mapped.



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;




The interesting thing is that I only started getting this error after adding the @JsonProperty("feedbackURI") annotation on the feedbackUri column.



@InitBinder was not being used before and there was no fortify error and all the parameters in the request are mandatory.



All other APIs are fine and do not report any fortify issues. Only this api and another one in which the @JsonProperty was added have started showing this error.



Fortify Issue Image



Any help would be appreciated.










share|improve this question




























    0















    I am getting Mass Assignment: Insecure Binder Configuration in fortify analysis.



    Here is the 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




    Here is the AuthorisationRequestInfo.class on which the http request params will be mapped.



    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;




    The interesting thing is that I only started getting this error after adding the @JsonProperty("feedbackURI") annotation on the feedbackUri column.



    @InitBinder was not being used before and there was no fortify error and all the parameters in the request are mandatory.



    All other APIs are fine and do not report any fortify issues. Only this api and another one in which the @JsonProperty was added have started showing this error.



    Fortify Issue Image



    Any help would be appreciated.










    share|improve this question


























      0












      0








      0








      I am getting Mass Assignment: Insecure Binder Configuration in fortify analysis.



      Here is the 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




      Here is the AuthorisationRequestInfo.class on which the http request params will be mapped.



      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;




      The interesting thing is that I only started getting this error after adding the @JsonProperty("feedbackURI") annotation on the feedbackUri column.



      @InitBinder was not being used before and there was no fortify error and all the parameters in the request are mandatory.



      All other APIs are fine and do not report any fortify issues. Only this api and another one in which the @JsonProperty was added have started showing this error.



      Fortify Issue Image



      Any help would be appreciated.










      share|improve this question
















      I am getting Mass Assignment: Insecure Binder Configuration in fortify analysis.



      Here is the 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




      Here is the AuthorisationRequestInfo.class on which the http request params will be mapped.



      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;




      The interesting thing is that I only started getting this error after adding the @JsonProperty("feedbackURI") annotation on the feedbackUri column.



      @InitBinder was not being used before and there was no fortify error and all the parameters in the request are mandatory.



      All other APIs are fine and do not report any fortify issues. Only this api and another one in which the @JsonProperty was added have started showing this error.



      Fortify Issue Image



      Any help would be appreciated.







      spring-mvc fortify






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 4:16







      The Assassin

















      asked Nov 13 '18 at 13:13









      The AssassinThe Assassin

      2716




      2716






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281790%2fmass-assignment-insecure-binder-configuration-fortify-error-after-adding-jso%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281790%2fmass-assignment-insecure-binder-configuration-fortify-error-after-adding-jso%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto