@ai-ecoverse/slicc-browsers 1.26.1 → 1.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/guard-vectors.json +275 -4
- package/package.json +2 -2
- package/protected-parent-iframes.mjs +11 -3
- package/schema/guard-vectors.schema.json +8 -2
- package/sign-in-hold.mjs +15 -8
package/README.md
CHANGED
|
@@ -229,6 +229,7 @@ You supply:
|
|
|
229
229
|
| capability | means the transport can |
|
|
230
230
|
| --- | --- |
|
|
231
231
|
| `autoAttach` | auto-attach to child targets such as popups and iframes |
|
|
232
|
+
| `iframeAutoAttach` | auto-attach non-tab child targets (out-of-process iframes) under a page session |
|
|
232
233
|
| `browserSession` | send commands on the browser session, not only a page |
|
|
233
234
|
| `browserContexts` | create isolated browser contexts |
|
|
234
235
|
| `discovery` | report target create/change without a session |
|
|
@@ -240,7 +241,7 @@ You supply:
|
|
|
240
241
|
| `secureOrigin` | HTTPS origins (service workers) |
|
|
241
242
|
| `stockSetup`, `syntheticAutoAttach` | admit stock clients' setup calls; synthesize auto-attach |
|
|
242
243
|
| `closeProtected` | close a protected tab, except live vault/seven-UI disguises |
|
|
243
|
-
| `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs |
|
|
244
|
+
| `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs without over-blocking ordinary ones |
|
|
244
245
|
|
|
245
246
|
### Reading the result
|
|
246
247
|
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.26.
|
|
3
|
+
"setVersion": "1.26.3",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"syntheticAutoAttach": "the transport has no native Target.setAutoAttach, so the guard attaches new tabs, pages and their children itself and synthesizes Target.attachedToTarget, with the same placement and holds",
|
|
108
108
|
"secureOrigin": "the fixture and page origins are secure contexts (HTTPS), so service worker registration is available",
|
|
109
109
|
"closeProtected": "the guard lets Target.closeTarget close a protected tab",
|
|
110
|
+
"iframeAutoAttach": "the transport auto-attaches non-tab child targets (out-of-process iframes) under a page session: Target.setAutoAttach with children steps and child sessions for iframe targets, not only tab-level auto-attach",
|
|
110
111
|
"signInHold": "the guard runs seven's sign-in hold: holds about:blank#slicc-sign-in-<marker> popups (and keeps them held after they move to an ordinary URL), and keeps callback-only authorize tabs that name seven's callback out of /json/list, Target.getTargets, discovery events, attach and title/body reads; announcing only the target id with empty URL/title while a Puppeteer-style connect still completes is acceptable"
|
|
111
112
|
},
|
|
112
113
|
"placeholders": {
|
|
@@ -31785,7 +31786,7 @@
|
|
|
31785
31786
|
}
|
|
31786
31787
|
],
|
|
31787
31788
|
"targets": ["seven", "vault"],
|
|
31788
|
-
"requires": ["
|
|
31789
|
+
"requires": ["iframeAutoAttach"],
|
|
31789
31790
|
"observe": {
|
|
31790
31791
|
"frameTree": {
|
|
31791
31792
|
"means": "C3.protected-parent-iframes.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
|
|
@@ -31948,7 +31949,7 @@
|
|
|
31948
31949
|
}
|
|
31949
31950
|
],
|
|
31950
31951
|
"targets": ["seven"],
|
|
31951
|
-
"requires": ["
|
|
31952
|
+
"requires": ["iframeAutoAttach"],
|
|
31952
31953
|
"observe": {
|
|
31953
31954
|
"frameTree": {
|
|
31954
31955
|
"means": "C3.protected-parent-srcdoc.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
|
|
@@ -32099,7 +32100,7 @@
|
|
|
32099
32100
|
}
|
|
32100
32101
|
],
|
|
32101
32102
|
"targets": ["seven"],
|
|
32102
|
-
"requires": ["
|
|
32103
|
+
"requires": ["iframeAutoAttach"],
|
|
32103
32104
|
"observe": {
|
|
32104
32105
|
"frameTree": {
|
|
32105
32106
|
"means": "C3.ordinary-parent-iframes.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
|
|
@@ -32781,6 +32782,276 @@
|
|
|
32781
32782
|
"contentRead": false,
|
|
32782
32783
|
"connectCompletes": true
|
|
32783
32784
|
}
|
|
32785
|
+
},
|
|
32786
|
+
{
|
|
32787
|
+
"id": "C7.sign-in-hold.ordinary-popup",
|
|
32788
|
+
"family": "C",
|
|
32789
|
+
"kind": "cdp",
|
|
32790
|
+
"scope": "any",
|
|
32791
|
+
"defaultContext": true,
|
|
32792
|
+
"requires": ["signInHold", "browserSession"],
|
|
32793
|
+
"setup": [
|
|
32794
|
+
{
|
|
32795
|
+
"text": "an ordinary page opens an ordinary popup with no sign-in marker; through the guard the popup must still be listed in /json/list and Target.getTargets, appear in discovery events, attach and yield its title/body — a guard that hides or refuses it fails as protection by over-blocking"
|
|
32796
|
+
},
|
|
32797
|
+
{
|
|
32798
|
+
"page": "tab",
|
|
32799
|
+
"url": "{ordinary}/blank"
|
|
32800
|
+
}
|
|
32801
|
+
],
|
|
32802
|
+
"trigger": [
|
|
32803
|
+
{
|
|
32804
|
+
"signInHold": "ordinary-popup",
|
|
32805
|
+
"as": "probe",
|
|
32806
|
+
"requires": ["signInHold", "browserSession"]
|
|
32807
|
+
}
|
|
32808
|
+
],
|
|
32809
|
+
"targets": ["seven"],
|
|
32810
|
+
"observe": {
|
|
32811
|
+
"jsonListed": {
|
|
32812
|
+
"means": "C7.sign-in-hold.ordinary-popup: /json/list through the client shows the ordinary tab by id, URL or title",
|
|
32813
|
+
"check": {
|
|
32814
|
+
"result": "probe",
|
|
32815
|
+
"path": "result.jsonListed",
|
|
32816
|
+
"equals": true,
|
|
32817
|
+
"observer": "client"
|
|
32818
|
+
},
|
|
32819
|
+
"absencePoll": true
|
|
32820
|
+
},
|
|
32821
|
+
"targetsListed": {
|
|
32822
|
+
"means": "C7.sign-in-hold.ordinary-popup: Target.getTargets through the client shows the ordinary tab with a non-empty URL or title",
|
|
32823
|
+
"check": {
|
|
32824
|
+
"result": "probe",
|
|
32825
|
+
"path": "result.targetsListed",
|
|
32826
|
+
"equals": true,
|
|
32827
|
+
"observer": "client"
|
|
32828
|
+
},
|
|
32829
|
+
"absencePoll": true
|
|
32830
|
+
},
|
|
32831
|
+
"eventsSeen": {
|
|
32832
|
+
"means": "C7.sign-in-hold.ordinary-popup: a discovery event carries the ordinary tab with a non-empty URL or title",
|
|
32833
|
+
"requires": ["discovery"],
|
|
32834
|
+
"check": {
|
|
32835
|
+
"result": "probe",
|
|
32836
|
+
"path": "result.eventsSeen",
|
|
32837
|
+
"equals": true,
|
|
32838
|
+
"observer": "client"
|
|
32839
|
+
},
|
|
32840
|
+
"absencePoll": true
|
|
32841
|
+
},
|
|
32842
|
+
"idAnnounced": {
|
|
32843
|
+
"means": "C7.sign-in-hold.ordinary-popup: the client learned the tab's target id with empty URL and title (announce-only)",
|
|
32844
|
+
"check": {
|
|
32845
|
+
"result": "probe",
|
|
32846
|
+
"path": "result.idAnnounced",
|
|
32847
|
+
"equals": true,
|
|
32848
|
+
"observer": "client"
|
|
32849
|
+
},
|
|
32850
|
+
"absencePoll": true
|
|
32851
|
+
},
|
|
32852
|
+
"attachSession": {
|
|
32853
|
+
"means": "C7.sign-in-hold.ordinary-popup: Target.attachToTarget on the raw tab id returned a session",
|
|
32854
|
+
"check": {
|
|
32855
|
+
"result": "probe",
|
|
32856
|
+
"path": "result.attachSession",
|
|
32857
|
+
"equals": true,
|
|
32858
|
+
"observer": "client"
|
|
32859
|
+
}
|
|
32860
|
+
},
|
|
32861
|
+
"attachRefused": {
|
|
32862
|
+
"means": "C7.sign-in-hold.ordinary-popup: Target.attachToTarget on the raw tab id was refused with a slicc refusal",
|
|
32863
|
+
"check": {
|
|
32864
|
+
"result": "probe",
|
|
32865
|
+
"path": "result.attachRefused",
|
|
32866
|
+
"equals": true,
|
|
32867
|
+
"observer": "client"
|
|
32868
|
+
}
|
|
32869
|
+
},
|
|
32870
|
+
"contentRead": {
|
|
32871
|
+
"means": "C7.sign-in-hold.ordinary-popup: the client read the tab's title or body mark through the guard",
|
|
32872
|
+
"check": {
|
|
32873
|
+
"result": "probe",
|
|
32874
|
+
"path": "result.contentRead",
|
|
32875
|
+
"equals": true,
|
|
32876
|
+
"observer": "client"
|
|
32877
|
+
}
|
|
32878
|
+
},
|
|
32879
|
+
"connectCompletes": {
|
|
32880
|
+
"means": "C7.sign-in-hold.ordinary-popup: a Puppeteer-style Browser.getVersion plus Target.getTargets connect through the guard completed",
|
|
32881
|
+
"check": {
|
|
32882
|
+
"result": "probe",
|
|
32883
|
+
"path": "result.connectCompletes",
|
|
32884
|
+
"equals": true,
|
|
32885
|
+
"observer": "client"
|
|
32886
|
+
}
|
|
32887
|
+
}
|
|
32888
|
+
},
|
|
32889
|
+
"live": "the unguarded observer opened the ordinary popup and read its body mark",
|
|
32890
|
+
"liveCheck": {
|
|
32891
|
+
"result": "probe",
|
|
32892
|
+
"path": "result.live",
|
|
32893
|
+
"equals": true,
|
|
32894
|
+
"observer": "client"
|
|
32895
|
+
},
|
|
32896
|
+
"control": {
|
|
32897
|
+
"origin": "ordinary",
|
|
32898
|
+
"via": "unguarded",
|
|
32899
|
+
"expected": {
|
|
32900
|
+
"jsonListed": true,
|
|
32901
|
+
"targetsListed": true,
|
|
32902
|
+
"eventsSeen": true,
|
|
32903
|
+
"idAnnounced": false,
|
|
32904
|
+
"attachSession": true,
|
|
32905
|
+
"attachRefused": false,
|
|
32906
|
+
"contentRead": true,
|
|
32907
|
+
"connectCompletes": true
|
|
32908
|
+
}
|
|
32909
|
+
},
|
|
32910
|
+
"expected": {
|
|
32911
|
+
"jsonListed": true,
|
|
32912
|
+
"targetsListed": true,
|
|
32913
|
+
"eventsSeen": true,
|
|
32914
|
+
"idAnnounced": false,
|
|
32915
|
+
"attachSession": true,
|
|
32916
|
+
"attachRefused": false,
|
|
32917
|
+
"contentRead": true,
|
|
32918
|
+
"connectCompletes": true
|
|
32919
|
+
}
|
|
32920
|
+
},
|
|
32921
|
+
{
|
|
32922
|
+
"id": "C7.sign-in-hold.ordinary-authorize",
|
|
32923
|
+
"family": "C",
|
|
32924
|
+
"kind": "cdp",
|
|
32925
|
+
"scope": "any",
|
|
32926
|
+
"defaultContext": true,
|
|
32927
|
+
"requires": ["signInHold", "browserSession"],
|
|
32928
|
+
"setup": [
|
|
32929
|
+
{
|
|
32930
|
+
"text": "a tab at an authorize-like URL with client_id=other and redirect_uri naming an ordinary callback (no seven callback) must still be listed, attachable and readable through the guard — a guard that hides or refuses it fails as protection by over-blocking"
|
|
32931
|
+
},
|
|
32932
|
+
{
|
|
32933
|
+
"page": "tab",
|
|
32934
|
+
"url": "{ordinary}/blank"
|
|
32935
|
+
}
|
|
32936
|
+
],
|
|
32937
|
+
"trigger": [
|
|
32938
|
+
{
|
|
32939
|
+
"signInHold": "ordinary-authorize",
|
|
32940
|
+
"as": "probe",
|
|
32941
|
+
"requires": ["signInHold", "browserSession"]
|
|
32942
|
+
}
|
|
32943
|
+
],
|
|
32944
|
+
"targets": ["seven"],
|
|
32945
|
+
"observe": {
|
|
32946
|
+
"jsonListed": {
|
|
32947
|
+
"means": "C7.sign-in-hold.ordinary-authorize: /json/list through the client shows the ordinary tab by id, URL or title",
|
|
32948
|
+
"check": {
|
|
32949
|
+
"result": "probe",
|
|
32950
|
+
"path": "result.jsonListed",
|
|
32951
|
+
"equals": true,
|
|
32952
|
+
"observer": "client"
|
|
32953
|
+
},
|
|
32954
|
+
"absencePoll": true
|
|
32955
|
+
},
|
|
32956
|
+
"targetsListed": {
|
|
32957
|
+
"means": "C7.sign-in-hold.ordinary-authorize: Target.getTargets through the client shows the ordinary tab with a non-empty URL or title",
|
|
32958
|
+
"check": {
|
|
32959
|
+
"result": "probe",
|
|
32960
|
+
"path": "result.targetsListed",
|
|
32961
|
+
"equals": true,
|
|
32962
|
+
"observer": "client"
|
|
32963
|
+
},
|
|
32964
|
+
"absencePoll": true
|
|
32965
|
+
},
|
|
32966
|
+
"eventsSeen": {
|
|
32967
|
+
"means": "C7.sign-in-hold.ordinary-authorize: a discovery event carries the ordinary tab with a non-empty URL or title",
|
|
32968
|
+
"requires": ["discovery"],
|
|
32969
|
+
"check": {
|
|
32970
|
+
"result": "probe",
|
|
32971
|
+
"path": "result.eventsSeen",
|
|
32972
|
+
"equals": true,
|
|
32973
|
+
"observer": "client"
|
|
32974
|
+
},
|
|
32975
|
+
"absencePoll": true
|
|
32976
|
+
},
|
|
32977
|
+
"idAnnounced": {
|
|
32978
|
+
"means": "C7.sign-in-hold.ordinary-authorize: the client learned the tab's target id with empty URL and title (announce-only)",
|
|
32979
|
+
"check": {
|
|
32980
|
+
"result": "probe",
|
|
32981
|
+
"path": "result.idAnnounced",
|
|
32982
|
+
"equals": true,
|
|
32983
|
+
"observer": "client"
|
|
32984
|
+
},
|
|
32985
|
+
"absencePoll": true
|
|
32986
|
+
},
|
|
32987
|
+
"attachSession": {
|
|
32988
|
+
"means": "C7.sign-in-hold.ordinary-authorize: Target.attachToTarget on the raw tab id returned a session",
|
|
32989
|
+
"check": {
|
|
32990
|
+
"result": "probe",
|
|
32991
|
+
"path": "result.attachSession",
|
|
32992
|
+
"equals": true,
|
|
32993
|
+
"observer": "client"
|
|
32994
|
+
}
|
|
32995
|
+
},
|
|
32996
|
+
"attachRefused": {
|
|
32997
|
+
"means": "C7.sign-in-hold.ordinary-authorize: Target.attachToTarget on the raw tab id was refused with a slicc refusal",
|
|
32998
|
+
"check": {
|
|
32999
|
+
"result": "probe",
|
|
33000
|
+
"path": "result.attachRefused",
|
|
33001
|
+
"equals": true,
|
|
33002
|
+
"observer": "client"
|
|
33003
|
+
}
|
|
33004
|
+
},
|
|
33005
|
+
"contentRead": {
|
|
33006
|
+
"means": "C7.sign-in-hold.ordinary-authorize: the client read the tab's title or body mark through the guard",
|
|
33007
|
+
"check": {
|
|
33008
|
+
"result": "probe",
|
|
33009
|
+
"path": "result.contentRead",
|
|
33010
|
+
"equals": true,
|
|
33011
|
+
"observer": "client"
|
|
33012
|
+
}
|
|
33013
|
+
},
|
|
33014
|
+
"connectCompletes": {
|
|
33015
|
+
"means": "C7.sign-in-hold.ordinary-authorize: a Puppeteer-style Browser.getVersion plus Target.getTargets connect through the guard completed",
|
|
33016
|
+
"check": {
|
|
33017
|
+
"result": "probe",
|
|
33018
|
+
"path": "result.connectCompletes",
|
|
33019
|
+
"equals": true,
|
|
33020
|
+
"observer": "client"
|
|
33021
|
+
}
|
|
33022
|
+
}
|
|
33023
|
+
},
|
|
33024
|
+
"live": "the unguarded observer opened the ordinary authorize tab and read its body mark",
|
|
33025
|
+
"liveCheck": {
|
|
33026
|
+
"result": "probe",
|
|
33027
|
+
"path": "result.live",
|
|
33028
|
+
"equals": true,
|
|
33029
|
+
"observer": "client"
|
|
33030
|
+
},
|
|
33031
|
+
"control": {
|
|
33032
|
+
"origin": "ordinary",
|
|
33033
|
+
"via": "unguarded",
|
|
33034
|
+
"expected": {
|
|
33035
|
+
"jsonListed": true,
|
|
33036
|
+
"targetsListed": true,
|
|
33037
|
+
"eventsSeen": true,
|
|
33038
|
+
"idAnnounced": false,
|
|
33039
|
+
"attachSession": true,
|
|
33040
|
+
"attachRefused": false,
|
|
33041
|
+
"contentRead": true,
|
|
33042
|
+
"connectCompletes": true
|
|
33043
|
+
}
|
|
33044
|
+
},
|
|
33045
|
+
"expected": {
|
|
33046
|
+
"jsonListed": true,
|
|
33047
|
+
"targetsListed": true,
|
|
33048
|
+
"eventsSeen": true,
|
|
33049
|
+
"idAnnounced": false,
|
|
33050
|
+
"attachSession": true,
|
|
33051
|
+
"attachRefused": false,
|
|
33052
|
+
"contentRead": true,
|
|
33053
|
+
"connectCompletes": true
|
|
33054
|
+
}
|
|
32784
33055
|
}
|
|
32785
33056
|
]
|
|
32786
33057
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-browsers",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"test:unit:guard": "mkdir -p coverage/unit && node --experimental-vm-modules --no-warnings --experimental-test-coverage --test --test-concurrency=1 --test-coverage-include=guard-runner.mjs --test-coverage-include=guard-driver.mjs --test-coverage-include=extension-frame.mjs --test-coverage-include=fixture-server.mjs --test-coverage-include=fixture-client.mjs --test-coverage-include=observer-target.mjs --test-coverage-include=frame-read.mjs --test-coverage-include=bfcache-restore.mjs --test-coverage-include=protected-error-page.mjs --test-coverage-include=protected-parent-iframes.mjs --test-coverage-include=unparseable-url.mjs --test-coverage-include=scripts/browser-runner.mjs --test-coverage-include=scripts/validate.mjs --test-reporter=lcov --test-reporter-destination=coverage/unit/guard.lcov test/unit/guard-*.test.mjs && slicc-diff-cover coverage/unit/guard.lcov"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@ai-ecoverse/slicc-cdp": "1.
|
|
91
|
+
"@ai-ecoverse/slicc-cdp": "1.52.1",
|
|
92
92
|
"@ai-ecoverse/slicc-shared-web": "2.14.4",
|
|
93
93
|
"@biomejs/biome": "2.6.6",
|
|
94
94
|
"ajv": "8.20.0",
|
|
@@ -1267,6 +1267,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
|
|
|
1267
1267
|
const sessions = [...new Set((sessionIds ?? []).filter(Boolean))];
|
|
1268
1268
|
let anyUnanswered = false;
|
|
1269
1269
|
let unansweredId;
|
|
1270
|
+
let unansweredText;
|
|
1270
1271
|
for (const context of contexts) {
|
|
1271
1272
|
const ordered = [
|
|
1272
1273
|
context.sessionId,
|
|
@@ -1287,6 +1288,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
|
|
|
1287
1288
|
if (!answered(evaluated) && !gone) {
|
|
1288
1289
|
anyUnanswered = true;
|
|
1289
1290
|
unansweredId ??= context.id;
|
|
1291
|
+
unansweredText ??= errorText(evaluated);
|
|
1290
1292
|
continue;
|
|
1291
1293
|
}
|
|
1292
1294
|
takeFirst(
|
|
@@ -1306,6 +1308,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
|
|
|
1306
1308
|
if (result.contextEvaluate !== true && anyUnanswered) {
|
|
1307
1309
|
evaluateArm.unanswered = true;
|
|
1308
1310
|
evaluateArm.unansweredId ??= unansweredId;
|
|
1311
|
+
evaluateArm.unansweredText ??= unansweredText;
|
|
1309
1312
|
evaluateArm.out ??= { ok: false };
|
|
1310
1313
|
}
|
|
1311
1314
|
}
|
|
@@ -1345,7 +1348,7 @@ function recordChildEnable(out, label, child, childSessions, missing, result) {
|
|
|
1345
1348
|
return 'refused';
|
|
1346
1349
|
}
|
|
1347
1350
|
if (!answered(out)) {
|
|
1348
|
-
missing.push(`${label} unanswered`);
|
|
1351
|
+
missing.push(`${label} unanswered${errorText(out)}`);
|
|
1349
1352
|
return 'missing';
|
|
1350
1353
|
}
|
|
1351
1354
|
missing.push(`${label} failed: ${out.error?.message ?? out.error}`);
|
|
@@ -1560,8 +1563,13 @@ async function pollPageClient({
|
|
|
1560
1563
|
return windowMs;
|
|
1561
1564
|
}
|
|
1562
1565
|
|
|
1566
|
+
function errorText(out) {
|
|
1567
|
+
const text = String(out?.error?.message ?? out?.error ?? '').slice(0, 160);
|
|
1568
|
+
return text ? `: ${text}` : '';
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1563
1571
|
function enableFailure(out, label, missing) {
|
|
1564
|
-
if (!answered(out)) missing.push(`${label} unanswered`);
|
|
1572
|
+
if (!answered(out)) missing.push(`${label} unanswered${errorText(out)}`);
|
|
1565
1573
|
else if (!out.ok) missing.push(`${label} failed: ${out.error?.message ?? out.error}`);
|
|
1566
1574
|
}
|
|
1567
1575
|
|
|
@@ -2266,7 +2274,7 @@ function settlePageContexts(liveContexts, raw, evaluateArm, result, missing, ski
|
|
|
2266
2274
|
'contextEvaluate',
|
|
2267
2275
|
evaluateArm.unanswered,
|
|
2268
2276
|
evaluateArm.unansweredId
|
|
2269
|
-
? `Runtime.evaluate unanswered (${evaluateArm.unansweredId})`
|
|
2277
|
+
? `Runtime.evaluate unanswered (${evaluateArm.unansweredId}${evaluateArm.unansweredText ?? ''})`
|
|
2270
2278
|
: 'Runtime.evaluate unanswered',
|
|
2271
2279
|
missing,
|
|
2272
2280
|
{ contextEvaluate: false }
|
|
@@ -158,6 +158,10 @@
|
|
|
158
158
|
"signInHold": {
|
|
159
159
|
"type": "string",
|
|
160
160
|
"minLength": 1
|
|
161
|
+
},
|
|
162
|
+
"iframeAutoAttach": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
167
|
},
|
|
@@ -197,7 +201,8 @@
|
|
|
197
201
|
"stockSetup",
|
|
198
202
|
"syntheticAutoAttach",
|
|
199
203
|
"closeProtected",
|
|
200
|
-
"signInHold"
|
|
204
|
+
"signInHold",
|
|
205
|
+
"iframeAutoAttach"
|
|
201
206
|
]
|
|
202
207
|
},
|
|
203
208
|
"requires": {
|
|
@@ -602,7 +607,8 @@
|
|
|
602
607
|
"callback",
|
|
603
608
|
"callback-encoded",
|
|
604
609
|
"callback-origin",
|
|
605
|
-
"ordinary-popup"
|
|
610
|
+
"ordinary-popup",
|
|
611
|
+
"ordinary-authorize"
|
|
606
612
|
]
|
|
607
613
|
},
|
|
608
614
|
"as": {
|
package/sign-in-hold.mjs
CHANGED
|
@@ -25,8 +25,8 @@ function note(notes, label, evidence) {
|
|
|
25
25
|
notes.push(`${label}: ${JSON.stringify(evidence)}`);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function authorizeUrl(idp, redirect) {
|
|
29
|
-
return `${idp}/ims/authorize/v2?client_id
|
|
28
|
+
function authorizeUrl(idp, redirect, clientId = 'any') {
|
|
29
|
+
return `${idp}/ims/authorize/v2?client_id=${clientId}&redirect_uri=${redirect}&response_type=token`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function callbackRedirect(mode) {
|
|
@@ -579,10 +579,17 @@ async function callbackTab({
|
|
|
579
579
|
control,
|
|
580
580
|
}) {
|
|
581
581
|
const mark = BODY;
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
582
|
+
const ordinaryAuthorize = control || mode === 'ordinary-authorize';
|
|
583
|
+
const redirect = ordinaryAuthorize
|
|
584
|
+
? encodeURIComponent(`${ordinary}/cb`)
|
|
585
|
+
: callbackRedirect(mode);
|
|
586
|
+
if (!redirect && !ordinaryAuthorize) return { incomplete: `unknown callback mode ${mode}` };
|
|
587
|
+
const url = authorizeUrl(idp, redirect, ordinaryAuthorize ? 'other' : 'any');
|
|
588
|
+
note(notes, 'sign-in-hold.callback-url', {
|
|
589
|
+
url,
|
|
590
|
+
control: Boolean(ordinaryAuthorize),
|
|
591
|
+
mode,
|
|
592
|
+
});
|
|
586
593
|
|
|
587
594
|
const created = await outcome(reader.send('Target.createTarget', { url, background: true }));
|
|
588
595
|
if (!created.ok)
|
|
@@ -676,7 +683,7 @@ export async function signInHold({
|
|
|
676
683
|
eventStart,
|
|
677
684
|
control: control || mode === 'ordinary-popup',
|
|
678
685
|
})
|
|
679
|
-
: String(mode).startsWith('callback')
|
|
686
|
+
: String(mode).startsWith('callback') || mode === 'ordinary-authorize'
|
|
680
687
|
? await callbackTab({
|
|
681
688
|
reader,
|
|
682
689
|
client,
|
|
@@ -689,7 +696,7 @@ export async function signInHold({
|
|
|
689
696
|
discovery,
|
|
690
697
|
internalSessions,
|
|
691
698
|
eventStart,
|
|
692
|
-
control,
|
|
699
|
+
control: control || mode === 'ordinary-authorize',
|
|
693
700
|
})
|
|
694
701
|
: { incomplete: `unknown signInHold mode ${mode}` };
|
|
695
702
|
|