So, purchased this plugin for 5.3 to open pdfs. Great plugin, has an ‘open’ button that lets you pick a file with a file dialog. Saw the demo of it working, but when I tried it I got this error saying ‘Filedialogs are prevented’ I managed to find this error in one function, but it seems strange, because it seems like this function is set up to always block them and I can’t seme to find any way in the project settings to enable them.
Here is the function:
bool FCEFWebBrowserWindow::OnFileDialog(CefDialogHandler::FileDialogMode Mode, const CefString& DialogTitle, const CefString& DefaultFilePath, const std::vector<CefString>& AcceptFilters, int SelectedAcceptFilter, CefRefPtr<CefFileDialogCallback> Callback)
{
// This would prevent a file dialog from opening.
UE_LOG(LogWebBrowser, Error, TEXT("FileDialogs are prevented."));
return true;
}
Has anyone worked with this function before, or know a way (other than overriding it since this is launcher) to allow it to work? It’s bizarre that this is hardcoded to block.
This function is an interface for interacting with Chromium-based browsers.
It appears that its functionality was intentionally disabled in Unreal 5.4
According to commit patch that changed it, this was a security vulnerability.
You should probably report this issue to the plugin author.
It should still work on older Unreal versions though.
This is actually a pretty common tactic when you need to implement the interface but not all of it, you just provide a dummy function with some assert or error, so when the code needs to run it shows appropriate message instead of doing nothing.
Patches to vulnerabilities and critical issues are usually being applied into minor releases.
They’ve ported it to multiple releases starting from 5.3.1
That’s probably why you see it on your side.
Here’s the exact path in 5.3 branch: 983bc55f66844626fe47e137e8057123d90d133a
I don’t see this patch on the 5.2 though. It should still work on 5.2 and lower