]> www.vanbest.org Git - motioneye-debian/commit
Fixed regex pattern for extracting username from /proc/mounts
authorLen Kawamoto <lenkawamoto@users.noreply.github.com>
Wed, 7 Jun 2017 22:32:04 +0000 (15:32 -0700)
committerGitHub <noreply@github.com>
Wed, 7 Jun 2017 22:32:04 +0000 (15:32 -0700)
commit6eed7014c45b3b66a36c0e9ddc3c9fc61611f554
tree6ba99afecf413abade39ed5f0d8be45025161326
parentf13de3ce89074ca17afbcd6b29213f56903f9d15
Fixed regex pattern for extracting username from /proc/mounts

The previous pattern truncated a valid username which contained a hyphen (not as the first character) which resulted in MotionEye repeatedly try to unmount a "no longer necessary" mount point which didn't exist.  The end result was that the live preview video switched to the "No Camera" icon, no live preview was showing on the web interface, and no still images nor motion detected movies were being stored in the Network Storage folder.

The previous pattern of "[\w\s]+" (1 more occurrence of alpha, number, underscore, or any white space) seemed incorrect to me... though I'm not as familiar with non-Linux usernames nor what restrictions exist for usernames in CIFS mounting.  I simply used the default NAME_REGEX pattern specified in /usr/share/adduser/adduser.conf

See github issue #356 (https://github.com/ccrisan/motioneyeos/issues/356) and the follow-up google forums post (https://groups.google.com/forum/#!topic/motioneye/0Cve8obKAX8) for more history on this issue.
motioneye/smbctl.py