Store the remoteStorage user agent as text, not varchar(255)
CI / Test (pull_request) Failing after 46s
CI / Test (pull_request) Failing after 46s
Real-world user agents (in-app browsers, Android WebView variants) commonly exceed 255 characters. On PostgreSQL that would raise and 500 the consent POST and token exchange; SQLite dev/test does not enforce the limit, so it went unnoticed. Use text columns for user_agent on both tables. Part of #254
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
class AddUserAgentToRsAuthorizations < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
add_column :remote_storage_authorizations, :user_agent, :string
|
||||
add_column :rs_authorization_codes, :user_agent, :string
|
||||
add_column :remote_storage_authorizations, :user_agent, :text
|
||||
add_column :rs_authorization_codes, :user_agent, :text
|
||||
end
|
||||
end
|
||||
+2
-2
@@ -110,7 +110,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_02_130000) do
|
||||
t.string "redirect_uri"
|
||||
t.string "token"
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "user_agent"
|
||||
t.text "user_agent"
|
||||
t.integer "user_id", null: false
|
||||
t.integer "web_app_id"
|
||||
t.index ["permissions"], name: "index_remote_storage_authorizations_on_permissions"
|
||||
@@ -129,7 +129,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_02_130000) do
|
||||
t.text "permissions", default: "[]"
|
||||
t.string "redirect_uri", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "user_agent"
|
||||
t.text "user_agent"
|
||||
t.integer "user_id", null: false
|
||||
t.index ["code_digest"], name: "index_rs_authorization_codes_on_code_digest", unique: true
|
||||
t.index ["user_id"], name: "index_rs_authorization_codes_on_user_id"
|
||||
|
||||
Reference in new issue
Block a user