mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
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:
@@ -141,7 +141,7 @@ class Content extends React.Component<Props, State> {
|
||||
props={{
|
||||
repository,
|
||||
file,
|
||||
revision,
|
||||
revision: revision ? encodeURIComponent(revision) : "",
|
||||
handleExtensionError: this.handleExtensionError
|
||||
}}
|
||||
renderAll={true}
|
||||
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user