Version
v24.1.0
Platform
Microsoft Windows NT 10.0.26100.0 x64
Subsystem
No response
What steps will reproduce the bug?
Hi,
You can reproduce the bug using the following code snippet:
const https = require("https");
"use strict";
(function TestDeleteStringRelace() {
delete String.prototype.replace;
})();
{
(async function () {
const options = {
hostname: "example.com",
port: 443,
path: "/",
method: "POST",
headers: {
"Content-Type": "application/json",
},
};
const req = https.request(options, (res) => {
let data = "";
res.on("data", (chunk) => {
data += chunk;
});
res.on("end", () => {
console.log("Response:", data);
});
});
req.end();
})();
}
How often does it reproduce? Is there a required condition?
No specific condition
What is the expected behavior? Why is that the expected behavior?
Response: <HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://example.com/" on this server.<P>
Reference #18.8df6d517.1748608252.adec739b
<P>https://errors.edgesuite.net/18.8df6d517.1748608252.adec739b</P>
</BODY>
</HTML>
What do you see instead?
node:_tls_common:133
info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g,
^
TypeError: info.replace is not a function
at translatePeerCertificate (node:_tls_common:133:10)
at Object.translatePeerCertificate (node:_tls_common:126:27)
at TLSSocket.getPeerCertificate (node:_tls_wrap:1119:19)
at TLSSocket.onConnectSecure (node:_tls_wrap:1640:23)
at TLSSocket.emit (node:events:507:28)
at TLSSocket._finishInit (node:_tls_wrap:1077:8)
at ssl.onhandshakedone (node:_tls_wrap:863:12)
Node.js v24.1.0
Additional information
No response
Version
v24.1.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Hi,
You can reproduce the bug using the following code snippet:
How often does it reproduce? Is there a required condition?
No specific condition
What is the expected behavior? Why is that the expected behavior?
What do you see instead?
Additional information
No response