Security Vulnerability: Insecure Randomness

18 views
Skip to first unread message

Subhodeep Ghosh

unread,
Jan 11, 2018, 4:56:17 AM1/11/18
to Swagger
Using Math.Random() is not a secure way of generating random numbers. They cannot withstand cryptographic attacks by hackers.
This is being reported by fortify from swagger-UI.js
Is there a fix for this or a patch or explanation for the issue.



SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({
  initialize: function  () {},

  render: function(){
    this.model.parameterContentTypeId = 'pct' + Math.random();
    $(this.el).html(Handlebars.templates.parameter_content_type(this.model));
    return this;
  }

});


Subhodeep
Reply all
Reply to author
Forward
0 new messages