Skip to content
Snippets Groups Projects
Commit 40519cc1 authored by DJ Mountney's avatar DJ Mountney Committed by Imre (Admin)
Browse files

Ensure attributes that end in `_ids` are cleaned

This prevents an issue where you can steal other projects objects by
asking for ids that don't belong to you in import.
parent 9220fd9d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,7 +4,7 @@ module Gitlab
module ImportExport
class AttributeCleaner
ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + %w[group_id commit_id]
PROHIBITED_REFERENCES = Regexp.union(/\Acached_markdown_version\Z/, /_id\Z/, /_html\Z/).freeze
PROHIBITED_REFERENCES = Regexp.union(/\Acached_markdown_version\Z/, /_id\Z/, /_ids\Z/, /_html\Z/).freeze
 
def self.clean(*args)
new(*args).clean
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment