pubnub 5.3.1 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.pubnub.yml +9 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -3
- data/VERSION +1 -1
- data/lib/pubnub/events/history.rb +6 -10
- data/lib/pubnub/formatter.rb +0 -1
- data/lib/pubnub/subscribe_event/formatter.rb +1 -2
- data/lib/pubnub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c887ab663f1e0dc8c245c8a62677a371dc46a9454c3f5371159f951ddb78d9
|
4
|
+
data.tar.gz: 21dd9cd7754f3ecc8a9dcc38b23a30504381ef543ce0e01a33b51af9ba727d59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6626ad1366f8208953e322fdeda90eda491178fbadf7e522164c56fcedac64c7724badf2a7f770778c5fe16a8859c26fccac4c340755c7b5ee4f7416d5914df5
|
7
|
+
data.tar.gz: 3afeba49eb145bb0fad19fac7bae013323d7d24f7c2bc905a9d2a23483e7bad5280cd28bb26926284ccf0d187d69a90711af80f15a6f16932a1f518b64b6b25c
|
data/.pubnub.yml
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
---
|
2
|
-
version: "5.3.
|
2
|
+
version: "5.3.2"
|
3
3
|
changelog:
|
4
|
+
- date: 2023-11-23
|
5
|
+
version: v5.3.2
|
6
|
+
changes:
|
7
|
+
- type: improvement
|
8
|
+
text: "Return source event data when a client configured with crypto is unable to decrypt it (can be not encrypted data or encrypted with different options)."
|
4
9
|
- date: 2023-11-03
|
5
10
|
version: v5.3.1
|
6
11
|
changes:
|
@@ -675,7 +680,7 @@ sdks:
|
|
675
680
|
- x86-64
|
676
681
|
- distribution-type: package
|
677
682
|
distribution-repository: RubyGems
|
678
|
-
package-name: pubnub-5.3.
|
683
|
+
package-name: pubnub-5.3.2.gem
|
679
684
|
location: https://rubygems.org/gems/pubnub
|
680
685
|
requires:
|
681
686
|
- name: addressable
|
@@ -780,8 +785,8 @@ sdks:
|
|
780
785
|
- x86-64
|
781
786
|
- distribution-type: library
|
782
787
|
distribution-repository: GitHub release
|
783
|
-
package-name: pubnub-5.3.
|
784
|
-
location: https://github.com/pubnub/ruby/releases/download/v5.3.
|
788
|
+
package-name: pubnub-5.3.2.gem
|
789
|
+
location: https://github.com/pubnub/ruby/releases/download/v5.3.2/pubnub-5.3.2.gem
|
785
790
|
requires:
|
786
791
|
- name: addressable
|
787
792
|
min-version: 2.0.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# PubNub Ruby SDK
|
2
2
|
|
3
|
-
|
4
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b744287bb0324e2883f95525b12cf19f)](https://www.codacy.com/app/blazeroot/ruby?utm_source=github.com&utm_medium=referral&utm_content=pubnub/ruby&utm_campaign=Badge_Coverage)
|
5
|
-
[![Build Status](https://travis-ci.org/pubnub/ruby.svg?branch=master)](https://travis-ci.org/pubnub/ruby)
|
3
|
+
![Tests Status](https://github.com/pubnub/ruby/actions/workflows/run-tests.yml/badge.svg)
|
6
4
|
|
7
5
|
This is the official PubNub Ruby SDK repository.
|
8
6
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.3.
|
1
|
+
5.3.2
|
@@ -68,30 +68,26 @@ module Pubnub
|
|
68
68
|
|
69
69
|
def decrypt_history(message, crypto)
|
70
70
|
if @include_token || @include_meta
|
71
|
-
encrypted_message = Base64.
|
71
|
+
encrypted_message = Base64.strict_decode64(message['message'])
|
72
72
|
message['message'] = JSON.parse(crypto.decrypt(encrypted_message), quirks_mode: true)
|
73
|
-
|
74
73
|
message
|
75
74
|
else
|
76
|
-
encrypted_message = Base64.
|
75
|
+
encrypted_message = Base64.strict_decode64(message)
|
77
76
|
JSON.parse(crypto.decrypt(encrypted_message), quirks_mode: true)
|
78
77
|
end
|
78
|
+
rescue StandardError => e
|
79
|
+
puts "Pubnub :: DECRYPTION ERROR: #{e}"
|
80
|
+
message['decrypt_error'] = true if @include_token || @include_meta
|
81
|
+
message
|
79
82
|
end
|
80
83
|
|
81
84
|
def valid_envelope(parsed_response, req_res_objects)
|
82
85
|
messages = parsed_response[0]
|
83
86
|
|
84
|
-
# TODO: Uncomment code below when cryptor implementations will be added.
|
85
87
|
if crypto_module && messages
|
86
88
|
crypto = crypto_module
|
87
89
|
messages = messages.map { |message| decrypt_history(message, crypto) }
|
88
90
|
end
|
89
|
-
# if (@cipher_key || @app.env[:cipher_key] || @cipher_key_selector || @app.env[:cipher_key_selector]) && messages
|
90
|
-
# cipher_key = compute_cipher_key(parsed_response)
|
91
|
-
# random_iv = compute_random_iv(parsed_response)
|
92
|
-
# crypto = Crypto.new(cipher_key, random_iv)
|
93
|
-
# messages = messages.map { |message| decrypt_history(message, crypto) }
|
94
|
-
# end
|
95
91
|
|
96
92
|
start = parsed_response[1]
|
97
93
|
finish = parsed_response[2]
|
data/lib/pubnub/formatter.rb
CHANGED
@@ -33,10 +33,9 @@ module Pubnub
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def decipher_payload(message)
|
36
|
-
# TODO: Uncomment code below when cryptor implementations will be added.
|
37
36
|
return message[:payload] if message[:channel].end_with?('-pnpres') || crypto_module.nil?
|
38
37
|
|
39
|
-
encrypted_message = Base64.
|
38
|
+
encrypted_message = Base64.strict_decode64(message[:payload])
|
40
39
|
JSON.parse(crypto_module.decrypt(encrypted_message), quirks_mode: true)
|
41
40
|
rescue StandardError, UnknownCryptorError
|
42
41
|
message[:payload]
|
data/lib/pubnub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubnub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PubNub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|