Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-5998

Fail to render the measures page when the parameter pageSize does not contain an integer

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1
    • Component/s: Measures
    • Labels:
      None

      Description

      For instance when using this link : http://localhost:9000/measures/search?qualifiers[]=TRK&pageSize=abc, the page will fail with a 500 error.

      Here's the server's log :

      2014.12.31 12:26:04 ERROR web[o.s.s.ui.JRubyFacade]  Fail to render: http://localhost:9000/measures/search?qualifiers[]=TRK&pageSize=abc
      divided by 0
      	On line #225 of app/views/measures/_display_list.html.erb
      
          222:       link_to_function label, "refreshList#{widget_id}('#{filter.criteria[:sort]}', #{filter.criteria[:asc]}, '#{page_id}')"
          223:     } -%>
          224:   <% else %>
          225:     <%= table_pagination(filter.pagination, :colspan => colspan, :id => "measure_filter_foot#{widget_id}", :include_loading_icon => true) { |label, page_id|
          226:       link_to(label, filter.criteria.merge({:page => page_id}))
          227:     } -%>
          228:   <% end %>
      
          org/jruby/RubyFixnum.java:559:in `/'
          app/models/api/pagination.rb:44:in `pages'
          app/helpers/application_helper.rb:885:in `table_pagination'
          app/views/measures/_display_list.html.erb:225
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julien.lancelot Julien Lancelot
                Reporter:
                julien.lancelot Julien Lancelot
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: