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:
@@ -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.`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user