diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-06-12 14:16:12 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-06-12 14:16:12 +0000 |
| commit | be80a08c6a2a330e81d43fbfd345f05199e75947 (patch) | |
| tree | a824bb9153e707a71e9a72c342cb24c4b1bd4a4e /app.rb | |
| parent | 997a8e86d90132bc424c55d5be670b45571471ae (diff) | |
Rack::Utils.parse_nested_query maps form fields named 'entries[]' to
params['entries'] (without brackets). The route was reading
params['entries[]'] which was always nil, making entries always empty
and triggering the halt 400 guard.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app.rb')
| -rw-r--r-- | app.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1011,7 +1011,7 @@ post '/admin/people/:uuid/bulk_move' do require_admin! src = params[:uuid] action = params['bulk_action'].to_s.strip - entries = Array(params['entries[]']).map { |e| JSON.parse(e) rescue nil }.compact + entries = Array(params['entries']).map { |e| JSON.parse(e) rescue nil }.compact halt 400 if entries.empty? @@ -1117,7 +1117,7 @@ end post '/admin/people/:slug/bulk_reassign' do require_admin! - rels = Array(params['rels[]']) + rels = Array(params['rels']) to_uuid = params['to_uuid'].to_s.strip halt 400 if rels.empty? || to_uuid.empty? @@ -1140,7 +1140,7 @@ end post '/admin/photos/move_album' do require_admin! - rels = Array(params['rels[]']) + rels = Array(params['rels']) dst_rel = params['dst_rel'].to_s.strip.gsub(/\/+$/, '') halt 400 if rels.empty? || dst_rel =~ /\.\./ |
