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

Console functionality problem #30

Open
vvatikiotis opened this issue Aug 5, 2011 · 9 comments
Open

Console functionality problem #30

vvatikiotis opened this issue Aug 5, 2011 · 9 comments

Comments

@vvatikiotis
Copy link

with gem version 0.1.2 on a linux chromium 12.0.742.112.

The console opens up ok (backtic). I can insert chars in the CLI, but the enter key is ignored and the console view is always blank.

@oriolgual
Copy link
Member

Could you check if that is still happening using rack-webconsole from master?

@vvatikiotis
Copy link
Author

same problem. Same versions. Also using bundler 1.0.12, sinatra 1.2.6 and rack 1.3.2, rack-webconsole from master.

Gemfile:
gem "redis"
gem "SystemTimer", "1.2.3" # redis requires this
gem "sinatra", "1.2.6"
gem "activesupport", "3.0.5" # XML <-> JSON
gem "i18n"
gem "json"
gem "builder"
gem "nokogiri" # xpath
gem "dm-core", "1.1.0"
gem "dm-migrations", "1.1.0"

group :development, :test do
gem "shotgun"
gem "ruby-debug"
gem 'rack-webconsole', :git => 'https://github.com/codegram/rack-webconsole.git'
gem 'rack-test'
gem "capybara"
gem 'launchy' # capybara's save_and_open_page requires this
gem 'factory_girl'
gem 'rspec', '2.5'
gem 'rspec-core', '2.5.2'
gem "ZenTest", '4.6'
gem 'autotest'
gem "autotest-inotify"
gem "mysql2"
gem "dm-mysql-adapter", "1.1.0"
end

config.ru
require 'lib/myprox'
if Sinatra::Base.development?
require 'rack/webconsole'
use Rack::Webconsole
Rack::Webconsole.inject_jquery = true
end

run MyProx

@vvatikiotis
Copy link
Author

I had a quick look, no spec yet, I have to work on it (me newb)

In Repl#call :
return [status, headers, response] unless check_legitimate(req)

The above always returns. Repl.token is always nil even if req.params['token'] is not. Where do you set Repl.token ?

@vvatikiotis
Copy link
Author

sorry closed it by accident

@vvatikiotis
Copy link
Author

when the console is active and each time input is passed in the form, Repl is re-initialised, thus token = nil

@vvatikiotis
Copy link
Author

I've tracked it down to the ajax call which sends the token and the user query. unfortunately my javascript knowledge is nil...

So whenever there is the ajax POST at /webconsole, env['QUERY_STRING') is empty. the user query and the token aren't passed in the call.

I've used the query injection method and the standard way i.e. download and load jquery in my html. No joy.

@vvatikiotis
Copy link
Author

This is similar to bug #22. When I invoke shotgun I get a 404.
rackup works as expected.

@txus
Copy link
Member

txus commented Sep 14, 2012

Any updates / further insight on this?

@txus
Copy link
Member

txus commented Sep 19, 2013

@vvatikiotis any updates?

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

No branches or pull requests

3 participants