Skip to content
Snippets Groups Projects
Commit 7e92daad authored by Lukas Euler's avatar Lukas Euler Committed by Hugo Beauzée-Luyssen
Browse files

qt: playlist_controller: Ensure the path points to a directory


Not doing so could end up opening a file with the default application
associated with it, instead of opening a folder, leading to a potential
remote code execution.

Reported-by: default avatarFabian Bräunlein <fabian@positive.security>
Reported-by: default avatarLukas Euler <lukas@positive.security>
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent acf7da63
No related branches found
No related tags found
No related merge requests found
......@@ -322,8 +322,10 @@ void StandardPLPanel::popupAction( QAction *action )
temp = model->getURI( index );
if( ! temp.isEmpty() ) path = vlc_uri2path( temp.toLatin1().constData() );
if( path == NULL ) return;
temp = QFileInfo( qfu( path ) ).absolutePath();
if( !QFileInfo( temp ).isDir() ) return;
QDesktopServices::openUrl(
QUrl::fromLocalFile( QFileInfo( qfu( path ) ).absolutePath() ) );
QUrl::fromLocalFile( temp ) );
free( path );
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment