feat: Markdown, Rich text, Code, and Checklist note types have been moved to the new Plugins preferences pane. Previous notes created using these types will not experience any disruption. To create new notes using these types, you can reinstall them from the Plugins preferences screen. It is recommended to use the Super note type in place of these replaced note types. (#2630)

This commit is contained in:
Mo
2023-11-29 10:18:55 -06:00
committed by GitHub
parent bd971d5473
commit c43b593c60
58 changed files with 1106 additions and 680 deletions

View File

@@ -624,7 +624,6 @@ export class LegacyApiService
public async downloadOfflineFeaturesFromRepo(dto: {
repo: SNFeatureRepo
trustedFeatureHosts: string[]
}): Promise<{ features: AnyFeatureDescription[]; roles: string[] } | ClientDisplayableError> {
try {
const featuresUrl = dto.repo.offlineFeaturesUrl
@@ -633,9 +632,11 @@ export class LegacyApiService
throw Error('Cannot download offline repo without url and offlineKEy')
}
const TRUSTED_FEATURE_HOSTS = ['api.standardnotes.com', 'localhost']
const { hostname } = new URL(featuresUrl)
if (!dto.trustedFeatureHosts.includes(hostname)) {
if (!TRUSTED_FEATURE_HOSTS.includes(hostname)) {
return new ClientDisplayableError(`The offline features host ${hostname} is not in the trusted allowlist.`)
}