openstreetmap-website/app/models
Matt Amos cf6a5c17ee Fix bug allowing created elements to reference deleted ones
The bug allows a newly-created element to refer to a deleted one
if the transactions for both overlap. Precisely, the issue is that
the check that an element exists does not prevent a concurrent
transaction from altering that row.

Because "deleting" an element in the OSM database does not remove
the row, we cannot rely on FK constraints to ensure the correct
behaviour. Instead, this fix relies on manually locking referenced
elements.

Note that this "fix" is suboptimal, as it does not allow any
updates to the referenced elements. Updates which do not delete
the row could safely be done, but will be prevented.

Also, it's not clear what the negative performance impact of this
change will be.
2015-06-13 10:59:57 +01:00
..
access_token.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
acl.rb Fix rubocop lint issues 2015-02-20 08:56:16 +00:00
changeset.rb Improve test coverage 2015-02-27 00:40:37 +00:00
changeset_comment.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
changeset_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
client_application.rb Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
diary_comment.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
diary_entry.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
friend.rb Add basic support for logically deleting a user. 2008-08-24 16:53:42 +00:00
language.rb Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
message.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
node.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
node_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
note.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
note_comment.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
notifier.rb Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
oauth2_token.rb Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
oauth2_verifier.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
oauth_nonce.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
oauth_token.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
old_node.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
old_node_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
old_relation.rb Improve test coverage 2015-02-27 00:40:37 +00:00
old_relation_member.rb Replace deprecated methods with modern equivalents 2012-02-15 17:48:17 +00:00
old_relation_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
old_way.rb Improve test coverage 2015-02-27 00:40:37 +00:00
old_way_node.rb Replace deprecated methods with modern equivalents 2012-02-15 17:48:17 +00:00
old_way_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
redaction.rb Add extra tests for API and redaction controllers 2015-03-03 00:55:19 +00:00
relation.rb Fix bug allowing created elements to reference deleted ones 2015-06-13 10:59:57 +01:00
relation_member.rb Fix error resolving relation parents 2014-07-24 00:23:45 +01:00
relation_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
request_token.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
trace.rb The test train rolls ever onwards... 2015-03-01 17:04:39 +00:00
tracepoint.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
tracetag.rb Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
user.rb Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
user_block.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
user_preference.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
user_role.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
user_token.rb Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
way.rb Fix bug allowing created elements to reference deleted ones 2015-06-13 10:59:57 +01:00
way_node.rb Replace deprecated methods with modern equivalents 2012-02-15 17:48:17 +00:00
way_tag.rb Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00