feat: add browser upload queue and trusted sessions with bounded projections
This commit is contained in:
1 parent
84d52390f9
commit
b90aef79d0
79 files changed
+1962
-196
No files matched your search
@@ -57,7 +57,7 @@ func TestFeedGeckoAuthorizationAndHeaders(t *testing.T) {
|
||||
t.Error("credential/header leaked", h)
|
||||
}
|
||||
}
|
||||
if r.URL.Path != "/assets/v0.0.1/gecko.js" {
|
||||
if r.URL.Path != "/assets/v0.0.1/gecko.js" && r.URL.Path != "/distribution/v0.0.1/manifest.json" {
|
||||
t.Error("path", r.URL.Path)
|
||||
}
|
||||
w.Header().Set("Set-Cookie", "forbidden=1")
|
||||
@@ -133,6 +133,18 @@ func TestFeedGeckoAuthorizationAndHeaders(t *testing.T) {
|
||||
if w = feedRequestTest(s, token, "GET", "browser/", nil); w.Code != 404 {
|
||||
t.Fatal("disabled shell", w.Code)
|
||||
}
|
||||
if err = s.setSystemExtensionEnabled(domain, "organizer.feeds", false); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if w = feedRequestTest(s, token, "GET", "browser/distribution/v0.0.1/manifest.json", nil); w.Code != 200 {
|
||||
t.Fatal("sources lost after disabling extensions", w.Code)
|
||||
}
|
||||
if w = feedRequestTest(s, "", "GET", "browser/distribution/v0.0.1/manifest.json", nil); w.Code == 200 {
|
||||
t.Fatal("anonymous source download")
|
||||
}
|
||||
if err = s.setSystemExtensionEnabled(domain, "organizer.feeds", true); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err = s.setSystemExtensionEnabled(domain, "viewer.gecko", true); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -142,6 +154,9 @@ func TestFeedGeckoAuthorizationAndHeaders(t *testing.T) {
|
||||
if w = feedRequestTest(s, token, "GET", "browser/", nil); w.Code != 404 {
|
||||
t.Fatal("readonly browser", w.Code)
|
||||
}
|
||||
if w = feedRequestTest(s, token, "GET", "browser/distribution/v0.0.1/manifest.json", nil); w.Code != 200 {
|
||||
t.Fatal("readonly recipient lost source access", w.Code)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFeedGeckoWebsocketRevocation(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user