open-eid / chrome-token-signing

DEPRECATED Chrome and Firefox extension for signing with your eID on the web
https://github.com/open-eid/chrome-token-signing/wiki
GNU Lesser General Public License v2.1
206 stars 75 forks source link

chrome-token-signin process should check whether stdin is not /dev/null #5

Closed plaes closed 7 years ago

plaes commented 8 years ago

When accidentally starting chrome-token-signin process via window manager run dialog, process's stdin points to /dev/null and this causes process to run at 100% CPU.

Easiest way to test: chrome-token-signing </dev/null

Probably easiest way to fix it (assuming stdin only accepts input via pipes):

if (!isatty(fileno(stdin)) {
    // expecting stdin to be pipe
    exit(-1)
}
martinpaljak commented 7 years ago

This issue was moved to hwcrypto/hwcrypto-native#2