X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7fef0353f25ecb02d400987ec30763d1ce881a12..835eff634651a98602897a1fbdaa4a6426beedb1:/app/controllers/changeset_controller.rb?ds=inline diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index a2efdce7b..e0d75985d 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -241,13 +241,9 @@ class ChangesetController < ApplicationController changeset = Changeset.find(params[:id]) new_changeset = Changeset.from_xml(request.raw_post) - if new_changeset.nil? - render :text => "", :status => :bad_request - else - check_changeset_consistency(changeset, @user) - changeset.update_from(new_changeset, @user) - render :text => changeset.to_xml, :mime_type => "text/xml" - end + check_changeset_consistency(changeset, @user) + changeset.update_from(new_changeset, @user) + render :text => changeset.to_xml, :mime_type => "text/xml" end ## @@ -442,6 +438,8 @@ class ChangesetController < ApplicationController respond_to do |format| format.rss end + rescue OSM::APIBadUserInput + render :text => "", :status => :bad_request end private