Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect logic in ChorusHelper URI builder #125

Open
rmunn opened this issue Aug 18, 2021 · 0 comments
Open

Incorrect logic in ChorusHelper URI builder #125

rmunn opened this issue Aug 18, 2021 · 0 comments
Assignees

Comments

@rmunn
Copy link
Collaborator

rmunn commented Aug 18, 2021

The ChorusHelper URI builder has the following code in GetSyncUri():

public virtual string GetSyncUri(ILfProject project)
{
    var settings = MainClass.Container.Resolve<LfMergeSettings>();
    if (!string.IsNullOrEmpty(settings.LanguageDepotRepoUri))
        return settings.LanguageDepotRepoUri;

    var uriBldr = new UriBuilder(project.LanguageDepotProjectUri) {
        UserName = Username,
        Password = Password,
        Path = HttpUtility.UrlEncode(project.LanguageDepotProject.Identifier)
    };
    return uriBldr.Uri.ToString();
}

But this logic is incorrect: if there's a LanguageDepotRepoUri set in the LfMerge global settings, it will (of course) not be project-specific and not contain a project identifier. And so if someone sets the LanguageDepotRepoUri setting in the global config file, every project will fail to Send/Receive because GetSyncUri will start returning URIs with no project identifier in them.

The logic for handling a non-empty settings.LanguageDepotRepoUri value needs to include the project identifier in the URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant