mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fixed (very dirty) encode content in Request Block.
This commit is contained in:
@@ -393,7 +393,14 @@ namespace RuriLib
|
||||
.Select(p => ReplaceValues(p, data)));
|
||||
if (pData != "")
|
||||
{
|
||||
if (encodeContent) pData = System.Uri.EscapeDataString(pData);
|
||||
if (encodeContent)
|
||||
{
|
||||
// Very dirty but it works
|
||||
var nonce = data.rand.Next(1000000, 9999999);
|
||||
pData = pData.Replace("&", $"{nonce}&{nonce}").Replace("=", $"{nonce}={nonce}");
|
||||
pData = System.Uri.EscapeDataString(pData).Replace($"{nonce}%26{nonce}", "&").Replace($"{nonce}%3D{nonce}", "=");
|
||||
}
|
||||
|
||||
content = new StringContent(pData);
|
||||
content.ContentType = cType;
|
||||
data.Log(new LogEntry(string.Format("Post Data: {0}", pData), Colors.MediumTurquoise));
|
||||
|
||||
Reference in New Issue
Block a user