Follow-up from "Tags::CreateService: add a handler for NoRepository exception"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
Reported by @olaoluro: !184759 (comment 2401270623)
The following discussion from !184759 (merged) should be addressed:
-
@olaoluro started a discussion: issue (non-blocking): I am able to reproduce this issue only when the
tag_nameandmessageare both set i.e we settag_nameto a special character AND we have a message but when we have an empty message, we get backnew_tag = falsenew_tag = repository.add_tag(current_user, "\x7f", target, nil)` # which results in false and returns "Target main is invalid" to the UIThe problem here is, the message
Target main is invalidis not a correct representation of the error happening here. It's not actually a problem with the target but with the tag name containing invalid characters.This MR handles the
Gitlab::Git::Repository::NoRepositoryerror we get back but I think we should have a separate issue that handles specials characters in theGitlab::GitRefValidator.
Proposal
- Review
Gitlab::GitRefValidatorsupport for special characters. Currently, it allows them however they are blocked by Git.