17 votes
Accepted

How to uncompress strings safely (without any evaluation)?

This is definitely a bug. Here's a slightly simpler workaround than those suggested in the comments: Uncompress[str, HoldComplete] // InputForm Generally ...
Itai Seggev's user avatar
  • 14.1k
9 votes

Security of SendMail

Computers communicate with each other through protocols. For example, web servers communicate with browsers using HTTP – the Hypertext Transfer Protocol. Another protocol is HTTPS – the Hypertext ...
C. E.'s user avatar
  • 70.4k
7 votes
Accepted

Is it possible to make notebook read-only without using OS file read only setting?

You can set the Saveable property to False. Use Format -> Option Inspector, set the Scope to Selected Notebook, search for ...
Szabolcs's user avatar
  • 234k
7 votes
Accepted

Locking cell groups

You can set the status flag of the CellGroupData of your cells to Dynamic[False, None]. This ...
Lukas Lang's user avatar
  • 33.6k
6 votes
Accepted

Generating Google BigQuery API Access Token in Wolfram Language

Google Cloud Platform uses the RS256 algorithm to send JWT and retrieve the tokens, all that is needed is to make a function that builds the JWT and creates a signature using ...
Cabral's user avatar
  • 138
6 votes
Accepted

How do I generate a JSON Web Token?

I stole the HMAC from here https://mathematica.stackexchange.com/a/167636/72682. The header/payload/secret are the same as the ones on the Wikipedia page https://en.wikipedia.org/wiki/JSON_Web_Token. ...
flinty's user avatar
  • 24.7k
6 votes

Lock .nb cells of a file

If you want to make some functions available for use, but you do not want the users to be able to read your source code: Put the functions into a package Make sure that all the functions are ...
Szabolcs's user avatar
  • 234k
4 votes

Safe alternatives to ToExpression

This is too long to fit in a comment so I post it as an answer, sorry. The last example provided in the question seems already very effective and useful to me. What are the shortcomings of this ...
Theo Tiger's user avatar
  • 1,273
4 votes

Lock .nb cells of a file

A Cell can be made so that it is not possible to delete using the computer keyboard or the edit menu. To do this, use ...
b3m2a1's user avatar
  • 46.8k
3 votes

How to run a wolfram-server safely on a VPS as a backend of a webpage?

People at Wolfram just let me know about the hidden sandbox option. So, a safer way to run the Wolfram Engine as a back-end is: wolframscript -sandbox
Fortsaint's user avatar
  • 2,060
3 votes
Accepted

Why InitializationCellWarning is False and still I get warnings?

You could simply do SetOptions[$FrontEndSession, {InitializationCellEvaluation -> True, InitializationCellWarning -> False}]; Now Initialization ...
Alexey Popkov's user avatar
3 votes

How to add a trusted path in Mathematica?

You can do it programmatically: ...
István Zachar's user avatar
2 votes

Safe alternatives to ToExpression

In more recent versions (certainly in 13.3), there is an Interpreter type of "ComputedNumber" which I think achieves your desired goals: ...
Joshua Schrier's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible