Changeset 89f2f2f155265eb0f9fdf6dff3fae40b9e70da7d
- Timestamp:
- 11/24/07 19:50:35
(9 months ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1195930235 +0000
- git-parent:
[91694c9338c5e0a7ad1a246e476ce53aec8875c6]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1195930235 +0000
- Message:
Re-enable EXTVLCOPT: parsing in m3u playlists. You'll need to append the --m3u-extvlcopt option to you command line if you want it.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r05c8198 |
r89f2f2f |
|
| 110 | 110 | int i_options = 0; |
|---|
| 111 | 111 | vlc_bool_t b_cleanup = VLC_FALSE; |
|---|
| | 112 | vlc_bool_t b_enable_extvlcopt = config_GetInt( p_demux, "m3u-extvlcopt" ); |
|---|
| 112 | 113 | input_item_t *p_input; |
|---|
| 113 | 114 | |
|---|
| … | … | |
| 146 | 147 | psz_artist = strdup( psz_artist ); |
|---|
| 147 | 148 | } |
|---|
| 148 | | #if 0 |
|---|
| 149 | | /* You're going to need a pretty strong explanation, why |
|---|
| 150 | | * this is not a big security hole if you are to uncomment |
|---|
| 151 | | * this piece of code. Potentially untrusted input file must |
|---|
| 152 | | * not be allowed to specify options in an open-handed fashion. |
|---|
| 153 | | * -- Courmisch |
|---|
| 154 | | */ |
|---|
| 155 | 149 | else if( !strncasecmp( psz_parse, "EXTVLCOPT:", |
|---|
| 156 | 150 | sizeof("EXTVLCOPT:") -1 ) ) |
|---|
| 157 | 151 | { |
|---|
| 158 | | /* VLC Option */ |
|---|
| 159 | | char *psz_option; |
|---|
| 160 | | psz_parse += sizeof("EXTVLCOPT:") -1; |
|---|
| 161 | | if( !*psz_parse ) goto error; |
|---|
| 162 | | |
|---|
| 163 | | psz_option = MaybeFromLocaleDup( psz_parse ); |
|---|
| 164 | | if( psz_option ) |
|---|
| 165 | | INSERT_ELEM( ppsz_options, i_options, i_options, |
|---|
| 166 | | psz_option ); |
|---|
| | 152 | if( b_enable_extvlcopt ) |
|---|
| | 153 | { |
|---|
| | 154 | /* VLC Option */ |
|---|
| | 155 | char *psz_option; |
|---|
| | 156 | psz_parse += sizeof("EXTVLCOPT:") -1; |
|---|
| | 157 | if( !*psz_parse ) goto error; |
|---|
| | 158 | |
|---|
| | 159 | psz_option = MaybeFromLocaleDup( psz_parse ); |
|---|
| | 160 | if( psz_option ) |
|---|
| | 161 | INSERT_ELEM( ppsz_options, i_options, i_options, |
|---|
| | 162 | psz_option ); |
|---|
| | 163 | } |
|---|
| | 164 | else |
|---|
| | 165 | { |
|---|
| | 166 | msg_Err( p_demux, "m3u EXTVLCOPT parsing is disabled for security reasons. If you need it and trust the m3u playlist you are trying to open, please append --m3u-extvlcopt to you command line." ); |
|---|
| | 167 | } |
|---|
| 167 | 168 | } |
|---|
| 168 | | #endif |
|---|
| 169 | 169 | } |
|---|
| 170 | 170 | else if( !strncasecmp( psz_parse, "RTSPtext", sizeof("RTSPtext") -1 ) ) |
|---|
| rc39b64d |
r89f2f2f |
|
| 46 | 46 | "ads skipping to detect ads and prevent adding them to the playlist." ) |
|---|
| 47 | 47 | |
|---|
| | 48 | #define EXTVLCOPT_TEXT N_( "Enable parsing of EXTVLCOPT: options" ) |
|---|
| | 49 | #define EXTVLCOPT_LONGTEXT N_( "Enable parsing of EXTVLCOPT: options in m3u " \ |
|---|
| | 50 | "playlists. This option is default disabled to prevent untrusted sources " \ |
|---|
| | 51 | "using VLC options without the user's knowledge." ) |
|---|
| | 52 | |
|---|
| 48 | 53 | vlc_module_begin(); |
|---|
| 49 | 54 | add_shortcut( "playlist" ); |
|---|
| … | … | |
| 66 | 71 | add_shortcut( "m3u-open" ); |
|---|
| 67 | 72 | set_capability( "demux2", 10 ); |
|---|
| | 73 | add_bool( "m3u-extvlcopt", VLC_FALSE, NULL, |
|---|
| | 74 | EXTVLCOPT_TEXT, EXTVLCOPT_LONGTEXT, VLC_FALSE ); |
|---|
| | 75 | change_unsaveable(); |
|---|
| 68 | 76 | set_callbacks( E_(Import_M3U), E_(Close_M3U) ); |
|---|
| 69 | 77 | add_submodule(); |
|---|