You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a Sinatra app doesn't have a views/ folder, the method detect_views() returns nil instead of an empty array, unlike the other detect_*() methods in sinatra.rb.
This causes a NoMethodError on line 37, which expects a valid @views array.
gems/codesake-dawn-1.2.0/lib/codesake/dawn/sinatra.rb:37:in `detect_reflected_xss': undefined method `each' for nil:NilClass (NoMethodError)
The simplest solution that doesn't require adding conditionals (or complicating existing ones) is simply to add a default empty array to the end of detect_views() on line 120.
The text was updated successfully, but these errors were encountered:
If a Sinatra app doesn't have a
views/
folder, the methoddetect_views()
returnsnil
instead of an empty array, unlike the otherdetect_*()
methods in sinatra.rb.https://github.com/codesake/codesake-dawn/blob/master/lib/codesake/dawn/sinatra.rb#L119
This causes a NoMethodError on line 37, which expects a valid
@views
array.The simplest solution that doesn't require adding conditionals (or complicating existing ones) is simply to add a default empty array to the end of
detect_views()
on line 120.The text was updated successfully, but these errors were encountered: