hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
722 stars 215 forks source link

RegexpError: end pattern with unmatched parenthesis: /^basti (.*/i #666

Closed carols10cents closed 11 years ago

carols10cents commented 11 years ago

Check full details on Airbrake: http://rstatus.airbrake.io/errors/52667178?auth_token=ab3bb3a1d53d986a8daffb99b48d60ff88568f4c

[PROJECT_ROOT]/app/models/user.rb:246:in `block in autocomplete'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongo_mapper-0.11.2/lib/mongo_mapper/plugins/associations/proxy.rb:104:in `each'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongo_mapper-0.11.2/lib/mongo_mapper/plugins/associations/proxy.rb:104:in `inject'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongo_mapper-0.11.2/lib/mongo_mapper/plugins/associations/proxy.rb:104:in `method_missing'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongo_mapper-0.11.2/lib/mongo_mapper/plugins/dynamic_querying.rb:39:in `method_missing'
[PROJECT_ROOT]/app/models/user.rb:245:in `autocomplete'
[PROJECT_ROOT]/app/controllers/users_controller.rb:110:in `autocomplete'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:425:in `_run__3457319320228123682__process_action__560170679396158937__callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in `block in process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:255:in `block in perform_action_with_newrelic_trace'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:250:in `perform_action_with_newrelic_trace'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in `process_action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:177:in `call!'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:157:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/builder.rb:48:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/rack/browser_monitoring.rb:23:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/exceptional-2.0.32/lib/exceptional/integration/rack_rails.rb:13:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongo_mapper-0.11.2/lib/mongo_mapper/middleware/identity_map.rb:10:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sass-3.1.21/lib/sass/plugin/rack.rb:54:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__4291711375076875430__call__802523440524334826__callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/sendfile.rb:102:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-ssl-1.3.2/lib/rack/ssl.rb:27:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/rack/log_tailer.rb:17:in `call'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
carols10cents commented 11 years ago

I should have caught this in code review :( Basically, we should be doing a Regexp.escape around user input for the autocomplete search. Some more info from airbrake:

Action users#autocomplete URL https://rstat.us/autocomplete?term=basti+( File app/models/user.rb:246 Similar Errors Occurred 3 times Parameters

{"term"=>"basti (", "format"=>"json", "controller"=>"users", "action"=>"autocomplete"}