Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting via FDSC does not work #89

Closed
Glorfindel83 opened this issue Jun 7, 2017 · 1 comment
Closed

Reporting via FDSC does not work #89

Glorfindel83 opened this issue Jun 7, 2017 · 1 comment

Comments

@Glorfindel83
Copy link
Member

Glorfindel83 commented Jun 7, 2017

Reporting a spam or rude/abusive post via FDSC does not work.

I accidentally closed the tab when analyzing the requests, but this request failed:

curl 'https://metasmoke.erwaysoftware.com/api/w/post/report' -H 'Host: metasmoke.erwaysoftware.com' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://ai.stackexchange.com/questions/74/what-is-the-difference-between-strong-ai-and-weak-ai/3447' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Origin: https://ai.stackexchange.com' -H 'Connection: keep-alive' --data 'post_link=&key=070f26ebb71c5e6cfca7893fe1139460cf23f30d686566f5707a4acfd50c&token=8261acd787360f76daf073662020428c50aa7384aec04d66722e36a0fbe01be8'

Metasmoke is complaining about the post_link being empty:

NameError in ApiController#report_post

undefined local variable or method `post_link' for #ApiController:0x007fc845a3e570 Did you mean? posts_url

  def report_post
    # We don't create any posts here, just send them on to Smokey to do all the processing
    ActionCable.server.broadcast 'smokedetector_messages', report: { user: @user.username, post_link: params[post_link] }

    render plain: 'OK', status: 201
  end

Rails.root: /var/railsapps/metasmoke/releases/20170606234804

@j-f1
Copy link
Contributor

j-f1 commented Jun 7, 2017

ugh, another rubocop fix. I’m kicking myself for using regexes now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants