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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a23b39985abaf9a9b77bb686e9dd9b7779c1dbd
4
- data.tar.gz: f6ac3cd6d79171cb0a56e1d7a928397605347035
3
+ metadata.gz: 22b6f0c770ae2aa335c878e2fd72e0b44be83e14
4
+ data.tar.gz: 18b6f384126ada888f65ca147aa7dfdac1eb23e7
5
5
  SHA512:
6
- metadata.gz: bfc5f3e28c62c4e374057a0fd00384c32df7d24b6cf30c3377692cdf3616abed95a0721d16b540113e0edfc4b2f057965810789ceed2c2daadc39c917190cb01
7
- data.tar.gz: a35a542c86ec95b394aeccf0a3fb7f5e24fb487def4b4984d4ac283e77b7e73120f7ae35a9461e7185a39a4c1ee5f889ebc685a4156310118bba4a8f67c16357
6
+ metadata.gz: 0390f9dcc7a8d90678c394c35146fffd5702d582d8ad39a675d34a76e56ff4257bc1ddc3dd9b37e2829977df0b41a5904029e1ea50124d2311823aca1a1bb3d1
7
+ data.tar.gz: f4d161c6e2aa3401e4fa891b79e905781acf965ba635fd3f9496a3ef3b9a25f3e8f9b7cf5a09be41a3554bb5bb057695562683119b91e52fb5dd49d2f7645b69
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.0
1
+ 1.9.1
@@ -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.0
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-08-02 00:00:00.000000000 Z
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt