| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
|
| |
|
| |
|
|
|
|
|
| |
(cherry picked from commit e2093c1f678175bde7c37c848686d979427346e1)
(cherry picked from commit d7dbe48273bd9e0adb1de5b52e3cdaeb4a65630b)
|
| |
|
|
|
|
| |
It is covered by following assertion.
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adds RedisAdapterTest::AlternateConfiguration to account
for a relatively common alternative setup, as it’s used
as the first example in the
[Redis rubygem](https://github.com/redis/redis-rb#getting-started)
- Supplies original RedisAdapterTest with more complete
redis:// url format by adding a ‘userinfo’ (blank user),
so that it resembles the alternate configuration
- Supplies original EventedRedisAdapterTest with more complete
redis:// url as well
- Adds before_script to start redis-server with password as a daemon
and with explicit defaults copied from the default redis.conf
(Instead of using Travis' default init/upstart scripts for `redis` service)
|
| |
|
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
| |
|
|
|
|
| |
https://bugs.ruby-lang.org/issues/13239
|
|
|
|
|
| |
These tests double-stub connection.pubsub, so we need to ensure the
first call's completed before we set up for the second.
|
|
|
|
|
| |
Unlike Faye support, it seems a bit too documented to remove without
warning. So, here's a warning.
|
|
|
|
|
|
|
| |
`assert_raise` does not check error message. However, in some tests,
it seems like expecting error message checking with `assert_raise`.
Instead of specifying an error message in `assert_raise`, modify to use
another assert to check the error message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ActionCable was throwing a "Existing connection must be closed before
opening" exception which was being picked up as a production issue in
our error monitoring software. Since this happens pretty often on any
device that allows the browser to sleep (mobile) this error was getting
triggered often.
This change removes the exception, but keeps logging the occurrence. We
now return `false` to let the caller now that `open` failed.
|
| |
|
|
|
|
|
|
|
| |
reactor_running? will be true just after the thread enters
EventMachine.run; reactor_thread only gets set after the internal
initialize_event_machine method has been called, the C extension is set
up, and it is entering its run loop.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WebSocket always defers the decision to the server, because it didn't
have to deal with legacy compatibility... but the same-origin policy is
still a reasonable default.
Origin checks do not protect against a directly connecting attacker --
they can lie about their host, but can also lie about their origin.
Origin checks protect against a connection from 3rd-party controlled
script in a context where a victim browser's cookies will be passed
along. And if an attacker has breached that protection, they've already
compromised the HTTP session, so treating the WebSocket connection in
the same way seems reasonable.
In case this logic proves incorrect (or anyone just wants to be more
paranoid), we retain a config option to disable it.
|
|\
| |
| |
| | |
Optionally allow ActionCable requests from the same host as origin
|
| |
| |
| |
| |
| |
| |
| | |
When the `allow_same_origin_as_host` is set to `true`, the request
forgery protection permits `HTTP_ORIGIN` values starting with the
corresponding `proto://` prefix followed by `HTTP_HOST`. This way
it is not required to specify the list of allowed URLs.
|
| | |
|
| | |
|
| |
| |
| |
| | |
We hit when we skip the PostgreSQL adapter.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Mostly, this is just to avoid EventMachine. But there's also an argument
to be made that we're better off using a different protocol library for
our test suite than the one we use to implement the server.
|
| | |
|
| | |
|
| |
| |
| |
| | |
No deprecation, because it was never documented.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
palkan/fix/actioncable-confirmation-race-condition
Avoid race condition on subscription confirmation
|
| | |
| | |
| | |
| | | |
initializing
|
| |/ |
|
|/
|
|
|
| |
Otherwise, they can sometimes block, leading to reduced system
throughput.
|
|
|
|
|
|
|
|
|
| |
Fixes #23757.
Before this commit, even if `reject` was called in the `subscribe`
method for an Action Cable channel, all actions on that channel could
still be invoked. This calls a `return` if a rejected connection tries
to invoke any actions on the channel.
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|\
| |
| | |
Add ActiveSupport::Notifications hook to ActionCable::Server.broadcast
|
| |
| |
| |
| |
| | |
This addition of this notification hook will give users better visibility
into the messages being sent over the PubSub adapter.
|
|\ \
| | |
| | | |
ActionCable, sometimes add_channel is not called.
|
| |/ |
|
| | |
|