unpoly-rails 3.7.3 → 3.7.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46d0ab0913d88d6ba567a358c4d0b23f11904c488a697101a5dcc6b65313c637
4
- data.tar.gz: a16ee4e7ffd7214b2fb0ca7db84b0c0cefe113054fc9efc40924a2dc26e7911d
3
+ metadata.gz: fe65b1062fe4fc2ac636cfe3ff36075ee51191787af8603148bbc82afb29cf6a
4
+ data.tar.gz: c1faa6da4f99dc68b9c1da6b951d226daae7838af948cdf593a5af0d5de30f4f
5
5
  SHA512:
6
- metadata.gz: a8d6f8929e89a69be1aea26541a9bbd3b0b13033b2036abd84d0918dfbdec4cea88bb2201157280f59978fc683091d87e73c2498993bc9d30e275b22b57b8721
7
- data.tar.gz: a4aef3a28a07bde970d01d01e993ff356bb55c9b8820dcf0278b171344bed7d3a881ce81c063ed19de723d4bf4a7a850062ffa1616e268b0ad6fdc079476a37f
6
+ metadata.gz: 8b7476b44985b9721665b3a5302582eb9dff9400c7b0a5ef2b062edf883a74d00021ad614ee53562a3beab7e2db3a19bbe75f9db3b18a429f8ea5c4ac90e4430
7
+ data.tar.gz: a7a4e597ad209a7239c41cfe82da24f31f1b7368035a3d6ec083ed34ecd93005a8697c5664086ca30751c485f3663178836cd361b46b61575f057355f0fe64c7
@@ -103,11 +103,17 @@ module Unpoly
103
103
  def parse(raw)
104
104
  result = Util.guard_json_decode(raw, &@default)
105
105
 
106
- if result.is_a?(::Hash)
107
- result = ActiveSupport::HashWithIndifferentAccess.new(result)
106
+ # A client might have sent valid JSON but not a JSON object.
107
+ # E.g. an array, number or string.
108
+ unless result.is_a?(::Hash)
109
+ if raw.present?
110
+ ::Rails.logger.error('unpoly-rails: Unexpected JSON value in X-Up header')
111
+ end
112
+
113
+ result = {}
108
114
  end
109
115
 
110
- result
116
+ ActiveSupport::HashWithIndifferentAccess.new(result)
111
117
  end
112
118
 
113
119
  def stringify(value)
@@ -3,6 +3,6 @@ module Unpoly
3
3
  ##
4
4
  # The current version of the unpoly-rails gem.
5
5
  # The first 3 digits should match the version of the Unpoly frontend code.
6
- VERSION = '3.7.3'
6
+ VERSION = '3.7.3.1'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unpoly-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.3
4
+ version: 3.7.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties