faye-authentication 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/faye/authentication.rb +1 -0
- data/spec/lib/faye/authentication_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22b6f0c770ae2aa335c878e2fd72e0b44be83e14
|
4
|
+
data.tar.gz: 18b6f384126ada888f65ca147aa7dfdac1eb23e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0390f9dcc7a8d90678c394c35146fffd5702d582d8ad39a675d34a76e56ff4257bc1ddc3dd9b37e2829977df0b41a5904029e1ea50124d2311823aca1a1bb3d1
|
7
|
+
data.tar.gz: f4d161c6e2aa3401e4fa891b79e905781acf965ba635fd3f9496a3ef3b9a25f3e8f9b7cf5a09be41a3554bb5bb057695562683119b91e52fb5dd49d2f7645b69
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.
|
1
|
+
1.9.1
|
data/lib/faye/authentication.rb
CHANGED
@@ -41,6 +41,7 @@ module Faye
|
|
41
41
|
|
42
42
|
def self.authentication_required?(message, options = {})
|
43
43
|
subscription_or_channel = message['subscription'] || message['channel']
|
44
|
+
return false if message['channel'].nil?
|
44
45
|
return false unless (message['channel'] == '/meta/subscribe' || (!(message['channel'].start_with?('/meta/'))))
|
45
46
|
whitelist_proc = options[:whitelist]
|
46
47
|
if whitelist_proc
|
@@ -95,6 +95,10 @@ describe Faye::Authentication do
|
|
95
95
|
it 'returns false if lambda returns true' do
|
96
96
|
expect(Faye::Authentication.authentication_required?(message, {whitelist: lambda { |message| true }})).to be(false)
|
97
97
|
end
|
98
|
+
|
99
|
+
it 'returns false if channel is nil' do
|
100
|
+
expect(Faye::Authentication.authentication_required?('clientId' => clientId, 'text' => 'whatever')).to be(false)
|
101
|
+
end
|
98
102
|
end
|
99
103
|
|
100
104
|
shared_examples 'meta_except_subscribe' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faye-authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Siami
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|