Security and privacy of QR code applications: A comprehensive study, general guidelines and solutions