@getxflow/cli 1.0.5 → 1.0.6
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/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +14 -10
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
|
|
4
4
|
/** Keep in sync with cli/package.json. */
|
|
5
|
-
exports.CLI_VERSION = '1.0.
|
|
5
|
+
exports.CLI_VERSION = '1.0.6';
|
|
6
6
|
/** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
|
|
7
7
|
exports.DEFAULT_API_URL = 'https://app.getxflow.com';
|
package/package.json
CHANGED
package/skills/xflow/SKILL.md
CHANGED
|
@@ -23,7 +23,7 @@ contains the fix.
|
|
|
23
23
|
|
|
24
24
|
## Keeping these instructions current
|
|
25
25
|
|
|
26
|
-
These instructions ship with xflow CLI 1.0.
|
|
26
|
+
These instructions ship with xflow CLI 1.0.6, so the copy you are reading can be older than
|
|
27
27
|
the CLI answering your commands.
|
|
28
28
|
|
|
29
29
|
When the CLI says this file does not match it, run `xflow skills --refresh` and then **read
|
|
@@ -312,22 +312,26 @@ At the closed levels do none of this: the platform already knows the person.
|
|
|
312
312
|
with `crypto.timingSafeEqual`. Never log a password, never return it, never keep it in the
|
|
313
313
|
browser.
|
|
314
314
|
- Session: after sign-in the function makes a random token (`crypto.randomBytes(32)`), stores
|
|
315
|
-
its SHA-256 and an expiry in a table and returns
|
|
316
|
-
`
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
its SHA-256 and an expiry in a table and returns the token in the response body. The app keeps
|
|
316
|
+
it in `localStorage` and sends it on every call in the `X-Session` header. Not a cookie: Cloud
|
|
317
|
+
Functions drop `Cookie` and `Set-Cookie` both ways. `localStorage` belongs to one address, a
|
|
318
|
+
neighbouring `*.xflowpage.ru` site does not read it.
|
|
319
|
+
- Any script on the page reads that token, so: an expiry of hours that each call extends,
|
|
320
|
+
sign-out and a password change delete the session rows, no user text rendered as HTML
|
|
321
|
+
(`dangerouslySetInnerHTML`), no scripts loaded from outside the build.
|
|
322
|
+
- Never put the token into an address (`?session=`, a link): it stays in history and logs. A file
|
|
323
|
+
the function makes for this person is fetched with the header and opened as a `blob:` URL.
|
|
320
324
|
- Not the `Authorization` header: `/_fn` replaces it with the platform's own. Nor headers named
|
|
321
325
|
`X-Xflow-*`, `X-Project-Pass`, `X-Server-Key`, `X-Function-Key`: the platform strips them.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
326
|
+
- Every function that serves a signed-in visitor reads `X-Session` from `event.headers` (match
|
|
327
|
+
the name in any case), finds the session and filters rows by that user in SQL. A hidden button
|
|
328
|
+
is not access control.
|
|
325
329
|
- Count failed sign-ins per email and per `event.xflow.ip` in a table and slow them down.
|
|
326
330
|
- Never in the frontend: keys, secrets, the list of users, hashes, a role check that is the only
|
|
327
331
|
guard.
|
|
328
332
|
- The platform sends no email for your app: confirmation and reset letters need a mail provider
|
|
329
333
|
whose key goes into `xflow env set`.
|
|
330
|
-
- `xflow dev`
|
|
334
|
+
- `xflow dev` does not carry `X-Session` and calls functions as you (a member).
|
|
331
335
|
Try the sign-in on the app address.
|
|
332
336
|
|
|
333
337
|
## Page or app
|