1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 14:34:59 +00:00

AK: Append correct number of port characters when serializing a URL

Instead of formatting a port string, it put bytes from stack, using the
port number as a length (so for port 8000 it appended 8000 bytes).
This commit is contained in:
Karol Kosek 2022-06-10 20:37:51 +02:00 committed by Linus Groh
parent c38d3b8520
commit 9e69a89f8e

View file

@ -347,7 +347,7 @@ String URL::serialize_origin() const
builder.append("://"sv); builder.append("://"sv);
builder.append(m_host); builder.append(m_host);
if (m_port.has_value()) if (m_port.has_value())
builder.append(":{}", *m_port); builder.appendff(":{}", *m_port);
return builder.build(); return builder.build();
} }