OWASP / Maturity-Models

Node application to help managing Maturity Models like the ones created by BSIMM and OpenSAMM
Apache License 2.0
187 stars 51 forks source link

Project highlight doesn't work with request params #211

Closed DinisCruz closed 7 years ago

DinisCruz commented 7 years ago

http://localhost:3000/view/project/samm/observed

image

http://localhost:3000/view/project/samm/observed?level=1 image

DinisCruz commented 7 years ago

Here is a test that replicates the bug

  it 'Issue 211 - Project highlight does not work with request params', ->
    inject ($location)->
      base_Path        = "/view/project/#{project}"
      using $scope.is_Active, ->
        $location.url(base_Path+'/observed')
        @('observed' ).assert_Is 'active'

        $location.url(base_Path+'/observed?level=aaaaa')
        @('observed' ).assert_Is  ''                    # here is the bug in action, this value should be set
        @('observed' ).assert_Is 'active'               # expected value

image

Note in the screenshot below how the error path shown by the code coverage shows the location of the problem (with the console.log providing direct feedback on the value passed )

image

image