[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.7.0esr-14.5-1] 2 commits: dropme! BB 40925: Implemented the Security Level component



Title: GitLab

morgan pushed to branch base-browser-128.7.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • f675e2ca
    by Pier Angelo Vendrame at 2025-02-19T14:24:57+00:00
    dropme! BB 40925: Implemented the Security Level component
    
    BB 43498: Remove our old patch for 43129.
    
    This commit should be ignored at the next rebase (and we will likely
    have a conflict on the security level commit).
    
  • 20e649a8
    by Pier Angelo Vendrame at 2025-02-19T14:24:57+00:00
    Bug 1923260 - Exempt Android resources from svg.disabled. r=peterv
    
    Differential Revision: https://phabricator.services.mozilla.com/D224895

1 changed file:

Changes:

  • dom/base/nsNodeInfoManager.cpp
    ... ... @@ -344,16 +344,6 @@ void nsNodeInfoManager::RemoveNodeInfo(NodeInfo* aNodeInfo) {
    344 344
     }
    
    345 345
     
    
    346 346
     static bool IsSystemOrAddonOrAboutPrincipal(nsIPrincipal* aPrincipal) {
    
    347
    -#ifdef ANDROID
    
    348
    -  if (aPrincipal->SchemeIs("resource")) {
    
    349
    -    nsAutoCString spec;
    
    350
    -    aPrincipal->GetAsciiSpec(spec);
    
    351
    -    if (StringBeginsWith(spec, "resource://android/assets/"_ns)) {
    
    352
    -      return true;
    
    353
    -    }
    
    354
    -  }
    
    355
    -#endif
    
    356
    -
    
    357 347
       return aPrincipal->IsSystemPrincipal() ||
    
    358 348
              BasePrincipal::Cast(aPrincipal)->AddonPolicy() ||
    
    359 349
              // NOTE: about:blank and about:srcdoc inherit the principal of their
    
    ... ... @@ -361,6 +351,21 @@ static bool IsSystemOrAddonOrAboutPrincipal(nsIPrincipal* aPrincipal) {
    361 351
              aPrincipal->SchemeIs("about");
    
    362 352
     }
    
    363 353
     
    
    354
    +static bool IsAndroidResource(nsIURI* aURI) {
    
    355
    +#ifdef ANDROID
    
    356
    +  if (aURI->SchemeIs("resource")) {
    
    357
    +    nsAutoCString host, path;
    
    358
    +    aURI->GetHost(host);
    
    359
    +    aURI->GetFilePath(path);
    
    360
    +    if (host.EqualsLiteral("android") &&
    
    361
    +        StringBeginsWith(path, "/assets/"_ns)) {
    
    362
    +      return true;
    
    363
    +    }
    
    364
    +  }
    
    365
    +#endif
    
    366
    +  return false;
    
    367
    +}
    
    368
    +
    
    364 369
     bool nsNodeInfoManager::InternalSVGEnabled() {
    
    365 370
       MOZ_ASSERT(!mSVGEnabled, "Caller should use the cached mSVGEnabled!");
    
    366 371
     
    
    ... ... @@ -386,6 +391,7 @@ bool nsNodeInfoManager::InternalSVGEnabled() {
    386 391
       // of system or add-on UI or about: page)
    
    387 392
       bool conclusion =
    
    388 393
           (SVGEnabled || IsSystemOrAddonOrAboutPrincipal(mPrincipal) ||
    
    394
    +       IsAndroidResource(mDocument->GetDocumentURI()) ||
    
    389 395
            (loadInfo &&
    
    390 396
             (loadInfo->GetExternalContentPolicyType() ==
    
    391 397
                  ExtContentPolicy::TYPE_IMAGE ||
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx