Skip to content

Commit 435e2bf

Browse files
authored
Merge branch 'master' into hlshen/v1beta
2 parents 6a198ae + d65aed8 commit 435e2bf

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- Re-add a dialog to let users know TLS is being provisioned in App Hosting (#7595)
12
- Improve Firebase Data Connect postgres security by granting fine grained SQL privileges to the users the need it. (#7578)
23
- Remove `dataconnect:sql:migrate` command hard dependency on 'roles/cloudsql.admin'. (#7578)
34
- Add support for setting the encryption configuration of restored firestore databases (#7483)

src/apphosting/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ async function tlsReady(url: string): Promise<boolean> {
4545
// At the time of this writing, the error code is ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE.
4646
// I've chosen to use a regexp in an attempt to be forwards compatible with new versions of
4747
// SSL.
48-
const maybeNodeError = err as { cause: { code: string } };
49-
if (/HANDSHAKE_FAILURE/.test(maybeNodeError?.cause?.code)) {
48+
const maybeNodeError = err as { cause: { code: string }; code: string };
49+
if (
50+
/HANDSHAKE_FAILURE/.test(maybeNodeError?.cause?.code) ||
51+
"EPROTO" === maybeNodeError?.code
52+
) {
5053
return false;
5154
}
5255
return true;

src/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,5 +915,12 @@ export function readSecretValue(prompt: string, dataFile?: string): Promise<stri
915915
if (dataFile && dataFile !== "-") {
916916
input = dataFile;
917917
}
918-
return Promise.resolve(fs.readFileSync(input, "utf-8"));
918+
try {
919+
return Promise.resolve(fs.readFileSync(input, "utf-8"));
920+
} catch (e: any) {
921+
if (e.code === "ENOENT") {
922+
throw new FirebaseError(`File not found: ${input}`, { original: e });
923+
}
924+
throw e;
925+
}
919926
}

0 commit comments

Comments
 (0)