There are no other safe alternatives. Handling this automatically would definitely lead to security issues.