obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.79k stars 701 forks source link

Bug: Bad character in FilenameFormatting incorrectly identified as controlled folder access problem #1216

Open working-name opened 2 months ago

working-name commented 2 months ago

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

30.1.2

obs-websocket Version

5.1.0

OBS Studio Log URL

https://obsproject.com/logs/kYzziu9yFBIGbTzC

OBS Studio Crash Log URL

https://obsproject.com/logs/wlvGs2uNwDQOpGBW

Expected Behavior

Websocket should apply the same filename input sanitization OBS does in its UI to the API requests via websocket or correctly send back an error as a response to the API request.

Current Behavior

Websocket accepts characters for recording prefix that include those not allowed by Windows/NTFS, namely | (among others, I assume). Instead of correctly identifying the problem, it instead displays a warning about a windows ransomware protection / controlled folder access issue, logging nothing in the logs or crashlogs that point the user to a useful area.

Steps to Reproduce

  1. send websocket request and set FilenameFormatting to some value including the | character.
  2. Then either manually start recording or do it programmatically while you're at it.
  3. OBS will display "Failed to start recording" error.
  4. Send the same record command (or manually click start recording) after clicking OK on the error, and OBS will crash.
  5. Look at logs, nothing useful.

Anything else we should know?

I hate that I have to click 4 times to change one thing about my recording encoder settings, and once I hit apply I cannot just click start recording, I have to exit settings. This was the biggest time suck I've seen, but then again... QT6. Anki vibes... 🤢