aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/wolfram.py
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-02-09 11:41:28 +0100
committerGravatar GitHub <[email protected]>2021-02-09 11:41:28 +0100
commit2f032a71beadd6c9613b89d525004c98a4cf6ab9 (patch)
tree2405b4cc895681430b6980a656311fdc54c0e53e /bot/exts/evergreen/wolfram.py
parentMerge pull request #554 from ChrisLovering/docker-compse-env-file (diff)
Add location mocks to the wolfram cog
Previously the server IP address could be leaked using some query such as “what is the weather here?” or simply “what’s my ip?”. This aims to fix it by using mock locations.
Diffstat (limited to 'bot/exts/evergreen/wolfram.py')
-rw-r--r--bot/exts/evergreen/wolfram.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/evergreen/wolfram.py b/bot/exts/evergreen/wolfram.py
index 898e8d2a..d3b4df5c 100644
--- a/bot/exts/evergreen/wolfram.py
+++ b/bot/exts/evergreen/wolfram.py
@@ -108,7 +108,10 @@ async def get_pod_pages(ctx: Context, bot: commands.Bot, query: str) -> Optional
"input": query,
"appid": APPID,
"output": DEFAULT_OUTPUT_FORMAT,
- "format": "image,plaintext"
+ "format": "image,plaintext",
+ "location": "the moon",
+ "latlong": "0.0,0.0",
+ "ip": "1.1.1.1"
})
request_url = QUERY.format(request="query", data=url_str)