Encode revision for extension point to fix breaking change (#1585)

Encode revision on extension points to fix a breaking change which slipped through with release 2.14.0.
This commit is contained in:
Eduard Heimbuch
2021-03-16 08:39:31 +01:00
committed by GitHub
parent 2ca4aa08de
commit 89e938c6d7
4 changed files with 27 additions and 16 deletions

View File

@@ -141,7 +141,7 @@ class Content extends React.Component<Props, State> {
props={{
repository,
file,
revision,
revision: revision ? encodeURIComponent(revision) : "",
handleExtensionError: this.handleExtensionError
}}
renderAll={true}

View File

@@ -64,7 +64,15 @@ const SourceExtensions: FC<Props> = ({ repository, baseUrl }) => {
return <Loading />;
}
const extprops = { extension, repository, revision, path, sources, baseUrl };
const extprops = {
extension,
repository,
revision: revision ? encodeURIComponent(revision) : "",
path,
sources,
baseUrl
};
if (!binder.hasExtension(extensionPointName, extprops)) {
return <Notification type="warning">{t("sources.extension.notBound")}</Notification>;
}