Misusing accept feature generates notification storm, also 500s the thread



  • So, in this topic, I've tested whether my suspicions are correct and you can generate a notification storm by repeatedly accepting the answer.

    I log into my bot account, and get this:

    https://what.thedailywtf.com/uploads/default/original/3X/c/4/c4bd3dbb618fe4952da0063263f208fef62d180a.png

    So the storm worked.

    Also, the thread in question apparently just gives up on loading and 500s.



  • Okay, the bot account is back to normal. Well, "normal"...



  • I'm also getting 500 for that thread. I was previously getting an actual error page, but it wasn't a very helpful error (I'm pretty sure it was "Sorry, we couldn't load that topic, possibly due to a connection problem. Please try again. If the problem persists, let us know.").



  • Well that's a Disco500.

    Fuck me, I think I broke the forum.

    EDIT: moved to Bugs. Any friendly TL4 care to drop the timer?



  • this thread ?
    https://what.thedailywtf.com/t/i-just-want-to-be-answered/50339

    Can't load that at the moment.
    EDIT: Dammit, missed the link in the OP -_-



  • This topic was automatically closed after 60 minutes. New replies are no longer allowed.


  • Discourse touched me in a no-no place


  • Discourse touched me in a no-no place

    ##Info

    NoMethodError (undefined method `to_i' for ["493876", "493876"]:Array)
    

    ##Backtrace

    /var/www/discourse/plugins/discourse-solved/plugin.rb:143:in `accepted_answer_post_id'
    /var/www/discourse/plugins/discourse-solved/plugin.rb:120:in `include_accepted_answer?'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:374:in `include?'
    (eval):44:in `_fast_attributes'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:467:in `rescue in attributes'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:455:in `attributes'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:479:in `_serializable_hash'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:349:in `as_json'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/multi_json-1.11.2/lib/multi_json/adapters/oj.rb:21:in `dump'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/multi_json-1.11.2/lib/multi_json/adapters/oj.rb:21:in `dump'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/multi_json-1.11.2/lib/multi_json/adapter.rb:25:in `dump'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/multi_json-1.11.2/lib/multi_json.rb:136:in `dump'
    /var/www/discourse/app/controllers/application_controller.rb:252:in `render_json_dump'
    /var/www/discourse/app/controllers/topics_controller.rb:482:in `block (2 levels) in perform_show_response'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/mime_responds.rb:258:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/mime_responds.rb:258:in `respond_to'
    /var/www/discourse/app/controllers/topics_controller.rb:475:in `perform_show_response'
    /var/www/discourse/app/controllers/topics_controller.rb:84:in `show'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:189:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rendering.rb:10:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:552:in `block (2 levels) in compile'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:86:in `run_callbacks'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:19:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rescue.rb:29:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `block in instrument'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `instrument'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:136:in `process'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.1.10/lib/action_view/rendering.rb:30:in `process'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.6/lib/mini_profiler/profiling_methods.rb:77:in `block in profile_method'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal.rb:196:in `dispatch'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal.rb:232:in `block in action'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:82:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:50:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:73:in `block in call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:59:in `each'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:59:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:692:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/builder.rb:59:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:25:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/head.rb:11:in `call'
    /var/www/discourse/lib/middleware/anonymous_cache.rb:124:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/flash.rb:254:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-1.0.16/lib/message_bus/rack/middleware.rb:60:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in `context'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/cookies.rb:562:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/query_cache.rb:36:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:82:in `run_callbacks'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-0.8.3/lib/logster/middleware/reporter.rb:31:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/rack/logger.rb:38:in `call_app'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/rack/logger.rb:22:in `call'
    /var/www/discourse/config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
    /var/www/discourse/config/initializers/silence_logger.rb:26:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/request_id.rb:21:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.6/lib/mini_profiler/profiler.rb:170:in `call'
    /var/www/discourse/lib/middleware/request_tracker.rb:73:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/engine.rb:514:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/application.rb:144:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/railtie.rb:194:in `public_send'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/railtie.rb:194:in `method_missing'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:138:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in `block in call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `each'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client'
    /var/www/discourse/lib/scheduler/defer.rb:85:in `process_client'
    /var/www/discourse/lib/middleware/unicorn_oobgc.rb:95:in `process_client'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
    /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
    

    ##Env

    HTTP_HOST: what.thedailywtf.com
    REQUEST_URI: /t/50339.json?track_visit=true&forceLoad=true&_=1438587995332
    REQUEST_METHOD: GET
    HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
    HTTP_ACCEPT: application/json, text/javascript, */*; q=0.01
    HTTP_REFERER: https://what.thedailywtf.com/t/i-just-want-to-be-answered/50339
    HTTP_X_FORWARDED_FOR: <snip>
    HTTP_X_REAL_IP: <snip>
    username: <snip>
    
    params:
      track_visit: true
      forceLoad: true
      _: 1438587995332
    


  • @PJH said:

    undefined method `to_i' for ["493876", "493876"]:Array

    $5 a race condition stored two acceptance records, and whatever SQL provider they're using now dumps them both in an array.

    Though my other test thread has two accepted answers and it works just fine, so...



  • Welp, that needs fixing too.


  • Discourse touched me in a no-no place

    :imp:


  • Banned

    It's a bug in the plugin, will fix



  • On an unrelated note, I'm not a fan of how this looks with the ALL CAPS and the giant locks.


  • Discourse touched me in a no-no place

    @Zecc said:

    On an unrelated note, I'm not a fan of how this looks with the ALL CAPS and the giant locks.

    .small-action .small-action-desc {
      text-transform: capitalize;
    }
    .small-action .topic-avatar i {
      font-size: 25px;
    }
    

  • sockdevs

    On the subject of CSS hacks, I've added this today:

    .topic-list a.title.visited:not(.badge-notification) {
        color: #222 !important;
    }
    

    For the topic lists, so all the text is black instead of grey.

    And yay, the newlines in code blocks are now fucked up :unamused:


  • Discourse touched me in a no-no place

    @RaceProUK said:

    color: #222

    @RaceProUK said:

    black

    Ò_o

    @RaceProUK said:

    And yay, the newlines in code blocks are now fucked up


  • sockdevs



  • @Zecc said:

    I'm not a fan of how this looks

    Please post an official bikeshedding request on meta.d


  • Discourse touched me in a no-no place

    Probably this:

    postgres@what:/$ psql -d discourse -c "select id, topic_id, value from topic_custom_fields where name='accepted_answer_post_id'" id | topic_id | value -------+----------+-------- **37706 | 50339 | 493876** **37707 | 50339 | 493876** 37724 | 50338 | 493872 38118 | 50349 | 494038 38121 | 50345 | 493958 (5 rows)

    I've altered 37707 to point elsewhere, that topic is visible again.



  • @PJH said:

    I've altered 37707 to point elsewhere, that topic is visible again.

    Aww, you broke my broken topic.

    Also, I thought you don't have write permissions on that DB?


  • Discourse touched me in a no-no place

    @Maciejasjmj said:

    Also, I thought you don't have write permissions on that DB?

    Changed a while back when there were disk-space issues that needed looking at.


  • I survived the hour long Uno hand

    @PJH said:

    I've altered 37707 to point elsewhere

    Pray I don't alter it any further :trolleybus:


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.