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

[ERROR] request#new (TypeError) "no implicit conversion of false into Integer" #5873

Closed
garethrees opened this issue Aug 20, 2020 · 2 comments
Labels
bug Breaks expected functionality f:request-creation x:uk

Comments

@garethrees
Copy link
Member

Spam request creation

A TypeError occurred in request#new:

no implicit conversion of false into Integer
app/models/info_request/sluggable.rb:38:in `update_url_title'


-------------------------------
Request:
-------------------------------

* URL : https://www.whatdotheyknow.com/new
* HTTP Method: POST
* Parameters : {"utf8"=>"✓", "authenticity_token"=>"", "info_request"=>{"title"=>"Emporio Armani Replica Watches - A Band Amado para Top Guns", "public_body_id"=>"16973"}, "outgoing_message"=>{"body"=>"SPAM_CONTENT_REMOVED"}, "submitted_new_request"=>"1", "preview"=>"1", "commit"=>"Preview your public request", "controller"=>"request", "action"=>"new"}
* Timestamp : 2020-08-19 10:14:18 +0100
* Server : owl
* Rails root : /data/vhost/www.whatdotheyknow.com/alaveteli-2020-08-14T14-54-29

-------------------------------
Session:
-------------------------------

* session id: [FILTERED]
* data: {"session_id"=>"5d0e885c209069b09990ae9550c14445", "locale"=>"en"}

-------------------------------
Environment:
-------------------------------

* CONTENT_LENGTH : 61964
* CONTENT_TYPE : application/x-www-form-urlencoded
* HTTP_ACCEPT : text/html,application/xhtml+xml,application/xml;image/png,image/jpeg,image/*;q=0.9,*/*;q=0.8
* HTTP_ACCEPT_ENCODING : gzip
* HTTP_ACCEPT_LANGUAGE : en-us;q=0.7, en;q=0.3
* HTTP_COOKIE : SameSite=Lax
* HTTP_HOST : www.whatdotheyknow.com
* HTTP_REFERER : https://www.whatdotheyknow.com/new/addison_primary_school_london
* HTTP_USER_AGENT : Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
* HTTP_VERSION : HTTP/1.1
* HTTP_X_FORWARDED_PROTO : https
* HTTP_X_REAL_IP : 134.119.218.243
* HTTP_X_VARNISH : 137560176
* ORIGINAL_FULLPATH : /new
* ORIGINAL_SCRIPT_NAME :
* PASSENGER_CONNECT_PASSWORD : [FILTERED]
* PATH_INFO : /new
* QUERY_STRING :
* REMOTE_ADDR : 134.119.218.243
* REMOTE_PORT : 34250
* REQUEST_METHOD : POST
* REQUEST_URI : /new
* ROUTES_47058150449000_SCRIPT_NAME :
* SCRIPT_NAME :
* SCRIPT_URI : http://www.whatdotheyknow.com/new
* SCRIPT_URL : /new
* SERVER_NAME : www.whatdotheyknow.com
* SERVER_PORT : 80
* SERVER_PROTOCOL : HTTP/1.1
* SERVER_SOFTWARE : Apache/2.4.25 (Debian) mod_fcgid/2.3.9 Phusion_Passenger/6.0.6
* action_controller.instance : #<RequestController:0x00007f92e29b5ec0>
* action_dispatch.authenticated_encrypted_cookie_salt : authenticated encrypted cookie
* action_dispatch.backtrace_cleaner : #<Rails::BacktraceCleaner:0x000055992b50de48>
* action_dispatch.content_security_policy :
* action_dispatch.content_security_policy_nonce_generator:
* action_dispatch.content_security_policy_report_only : false
* action_dispatch.cookies : #<ActionDispatch::Cookies::CookieJar:0x00007f92e1ae2c40>
* action_dispatch.cookies_digest :
* action_dispatch.cookies_rotations : #<ActiveSupport::Messages::RotationConfiguration:0x0000559926f28c70>
* action_dispatch.cookies_serializer : hybrid
* action_dispatch.encrypted_cookie_cipher :
* action_dispatch.encrypted_cookie_salt : encrypted cookie
* action_dispatch.encrypted_signed_cookie_salt : signed encrypted cookie
* action_dispatch.http_auth_salt : http authentication
* action_dispatch.key_generator : #<ActiveSupport::CachingKeyGenerator:0x000055992adf9828>
* action_dispatch.logger : #<ActiveSupport::Logger:0x0000559928b873a8>
* action_dispatch.parameter_filter : [:password]
* action_dispatch.redirect_filter : []
* action_dispatch.remote_ip : 134.119.218.243
* action_dispatch.request.content_type : application/x-www-form-urlencoded
* action_dispatch.request.formats : [#<Mime::Type:0x0000559928605c90 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=1392750181038351725>]
* action_dispatch.request.parameters : {"utf8"=>"&#x2713;", "authenticity_token"=>"", "info_request"=>{"title"=>"Emporio Armani Replica Watches - A Band Amado para Top Guns", "public_body_id"=>"16973"}, "outgoing_message"=>{"body"=>"[b][url=http://www.imagewatches.org/pt/]réplica relógios suíços aaa +[/url][/b]\n[b][url=http://www.imagew...
* action_dispatch.request.path_parameters : {:controller=>"request", :action=>"new"}
* action_dispatch.request.query_parameters : {}
* action_dispatch.request.request_parameters : {"utf8"=>"&#x2713;", "authenticity_token"=>"", "info_request"=>{"title"=>"Emporio Armani Replica Watches - A Band Amado para Top Guns", "public_body_id"=>"16973"}, "outgoing_message"=>{"body"=>"[b][url=http://www.imagewatches.org/pt/]réplica relógios suíços aaa +[/url][/b]\n[b][url=http://www.imagew...
* action_dispatch.request.unsigned_session_cookie : {"session_id"=>"5d0e885c209069b09990ae9550c14445"}
* action_dispatch.request_id : 2109a8d1-474d-4545-aaae-7f3378c66e5c
* action_dispatch.routes : #<ActionDispatch::Routing::RouteSet:0x0000559928aebed0>
* action_dispatch.secret_key_base : cb88832542fe42e4feb651568530865f6eb888b2aa72afb2ec1aeb7b6522d20381c24706dda04c9f4fbbba2a8fd61bb47d314b93a6ee922a7fec6646f5e76acd
* action_dispatch.secret_token :
* action_dispatch.show_detailed_exceptions : false
* action_dispatch.show_exceptions : true
* action_dispatch.signed_cookie_digest :
* action_dispatch.signed_cookie_salt : signed cookie
* action_dispatch.use_authenticated_cookie_encryption : false
* rack.errors : #<IO:0x000055992643c0c8>
* rack.hijack : #<Proc:0x00007f92e235f5a8@/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:94 (lambda)>
* rack.hijack? : true
* rack.input : #<Rack::UTF8Sanitizer::SanitizedRackInput:0x00007f92e04feb90>
* rack.multiprocess : true
* rack.multithread : false
* rack.request.cookie_hash : {"SameSite"=>"Lax"}
* rack.request.cookie_string : SameSite=Lax
* rack.request.form_hash : {"utf8"=>"&#x2713;", "authenticity_token"=>"", "info_request"=>{"title"=>"Emporio Armani Replica Watches - A Band Amado para Top Guns", "public_body_id"=>"16973"}, "outgoing_message"=>{"body"=>"[b][url=http://www.imagewatches.org/pt/]réplica relógios suíços aaa +[/url][/b]\n[b][url=http://www.imagew...
* rack.request.form_input : #<Rack::UTF8Sanitizer::SanitizedRackInput:0x00007f92e04feb90>
* rack.request.form_vars : [FILTERED]
* rack.request.query_hash : {}
* rack.request.query_string :
* rack.run_once : false
* rack.session : #<ActionDispatch::Request::Session:0x00007f92e29b7220>
* rack.session.options : #<ActionDispatch::Request::Session::Options:0x00007f92e29b71a8>
* rack.tempfiles : []
* rack.url_scheme : http
* rack.version : [1, 2]

-------------------------------
Backtrace:
-------------------------------

app/models/info_request/sluggable.rb:38:in `update_url_title'
app/models/info_request/sluggable.rb:16:in `block in title='
app/models/info_request/sluggable.rb:15:in `tap'
app/models/info_request/sluggable.rb:15:in `title='
app/models/info_request.rb:446:in `create_from_attributes'
app/controllers/request_controller.rb:332:in `new'
app/controllers/application_controller.rb:111:in `record_memory'
lib/strip_empty_sessions.rb:15:in `call'
@garethrees garethrees added x:uk bug Breaks expected functionality f:request-creation labels Aug 20, 2020
mysociety-pusher pushed a commit that referenced this issue Aug 27, 2020
There seems to be an issue with `MySociety::Format.simplify_url_part`
but we're not getting a full stack trace due to the source being outside
of app/lib.

This change should hopefully give us more information to allow us to
debug this issue.

See:
  #5870
  #5871
  #5873
  #5874
  #5876
  #5877
  #5878
  #5879
mysociety-pusher pushed a commit that referenced this issue Aug 30, 2020
There seems to be an issue with `MySociety::Format.simplify_url_part`
but we're not getting a full stack trace due to the source being outside
of app/lib.

This change should hopefully give us more information to allow us to
debug this issue.

See:
  #5870
  #5871
  #5873
  #5874
  #5876
  #5877
  #5878
  #5879
@garethrees
Copy link
Member Author

Backtrace after cdccd2a

-------------------------------
Backtrace:
-------------------------------

  lib/alaveteli_format.rb:10:in `normalize_KD'
  lib/alaveteli_format.rb:10:in `simplify_url_part'
  app/models/info_request/sluggable.rb:38:in `update_url_title'
  app/models/info_request/sluggable.rb:16:in `block in title='
  app/models/info_request/sluggable.rb:15:in `tap'
  app/models/info_request/sluggable.rb:15:in `title='
  app/models/info_request.rb:446:in `create_from_attributes'
  app/controllers/request_controller.rb:332:in `new'
  app/controllers/application_controller.rb:111:in `record_memory'
  lib/strip_empty_sessions.rb:15:in `call'

mysociety-pusher pushed a commit that referenced this issue Sep 10, 2020
There seems to be an issue with `MySociety::Format.simplify_url_part`
but we're not getting a full stack trace due to the source being outside
of app/lib.

This change should hopefully give us more information to allow us to
debug this issue.

See:
  #5870
  #5871
  #5873
  #5874
  #5876
  #5877
  #5878
  #5879
@gbp
Copy link
Member

gbp commented Oct 15, 2020

Closing after #5907

@gbp gbp closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks expected functionality f:request-creation x:uk
Projects
None yet
Development

No branches or pull requests

2 participants