[server] Minimum supported idle timeout is 5 sec
A system isn't idle by definition below 5 sec. Before it's not possible to properly determine whether the user is still interacting with the system or not. Thus such a short timeout is not sufficient to determine whether the system is idle. Furthermore allowing short timeouts like 1 msec can be used to gather information from the system. It would allow to reconstruct the timestamp changes on the seat very reliable, which we do not want a Client to know. And also this can be used to get events on each key press and key release and the time between each of the events. This can be used to gather statistics which would in worst case allow to reconstruct what the user is typing. Determining where a word starts and ends should be relatively straight forward if you know the timing. With the length of the word and the statistics of alphabetic distribution it becomes possible to reconstruct some words. And also individual letters. With enough statistic and some known words one can determine how long it takes to press a certain letter. At that point the idle interface would be a keylogger. To prevent such attacks the timestamp is now modified to be at least 5 sec. Why 5 sec? Because it's the smallest timestamp used in the KIdleTime example application which I do not want to break. 5 sec are long enough to destroy this possible attack. REVIEW: 126220
This commit is contained in:
parent
8748ef5199
commit
d96319b23d
1 changed files with 2 additions and 1 deletions
|
@ -168,7 +168,8 @@ void IdleTimeoutInterface::Private::setup(quint32 timeout)
|
|||
}
|
||||
timer = new QTimer(q);
|
||||
timer->setSingleShot(true);
|
||||
timer->setInterval(timeout);
|
||||
// less than 5 sec is not idle by definition
|
||||
timer->setInterval(qMax(timeout, 5000u));
|
||||
QObject::connect(timer, &QTimer::timeout, q,
|
||||
[this] {
|
||||
if (resource) {
|
||||
|
|
Loading…
Reference in a new issue