Closed LCraddock closed 6 years ago
Submit a search string that ends with an underscore.
Search results page
An error page is returned: Oops! Something went wrong. But don't fret!
Here's the error message:
[ActionView::Template::Error] undefined method `+' for nil:NilClass
Here's the error stack:
/opt/dradispro/dradispro/releases/20171002004545/app/helpers/search_helper.rb:28:in `format_match_row' /opt/dradispro/dradispro/releases/20171002004545/app/helpers/search_helper.rb:14:in `text_snippet' /opt/dradispro/dradispro/releases/20171002004545/app/views/search/results/_note.html.erb:13:in `_app_views_search_results__note_html_erb___1615438047636702625_70039436417600' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/template.rb:159:in `block in render' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/activesupport-5.0.5/lib/active_support/notifications.rb:166:in `instrument' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/template.rb:354:in `instrument' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/template.rb:157:in `render' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/renderer/partial_renderer.rb:343:in `render_partial' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/renderer/partial_renderer.rb:311:in `block in render' /opt/dradispro/dradispro/shared/bundle/ruby/2.2.0/gems/actionview-5.0.5/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
For more information, the application log can be found at /opt/dradispro/dradispro/releases/20171002004545/log/production.log.
v2.8.0:
Ruby version: 2.2.2p95
OS version: Linux dradis 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
Looks like a duplicate of #125
Thanks @Techbrunch I don't seem to be able to reproduce this problem with the current code base. Just closed #125.
Are you seeing a problem with _ in your search queries?
_
Steps to reproduce
Submit a search string that ends with an underscore.
Expected behavior
Search results page
Actual behavior
An error page is returned: Oops! Something went wrong. But don't fret!
Here's the error message:
Here's the error stack:
For more information, the application log can be found at /opt/dradispro/dradispro/releases/20171002004545/log/production.log.
System configuration
v2.8.0:
Ruby version: 2.2.2p95
OS version: Linux dradis 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux