search for: swfdecsecur

Displaying 19 results from an estimated 19 matches for "swfdecsecur".

2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
...SwfdecAsVariableForeach SwfdecAsVariableForeachRemove; typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint flags, gpointer data); +void swfdec_as_object_call_with_security + (SwfdecAsObject * object, + SwfdecSecurity * sec, + const char * name, + guint argc, + SwfdecAsValue * argv, + SwfdecAsValue * return_value); void swfdec_as_object_collect (SwfdecAsObject * object); guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, SwfdecAsVariableForeach fu...
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...INFO ("reserved bits (3) aren't 0"); + /* initialize default security if it wasn't initialized yet */ return SWFDEC_STATUS_OK; } commit 9d8262b31d4e3049462528c0ffce33ceb8f27a32 Author: Benjamin Otte <otte at gnome.org> Date: Wed Oct 17 22:28:52 2007 +0200 add a SwfdecSecurity object to the SwfdecPlayer diff --git a/libswfdec/swfdec_flash_security.c b/libswfdec/swfdec_flash_security.c index 0b6d07c..1a88534 100644 --- a/libswfdec/swfdec_flash_security.c +++ b/libswfdec/swfdec_flash_security.c @@ -82,6 +82,8 @@ swfdec_flash_security_init (SwfdecFlashSecurity *sec)...
2007 Dec 13
0
2 commits - libswfdec/swfdec_flash_security.c libswfdec/swfdec_flash_security.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_resource_request.c libswfdec/swfdec_resource_request.h libswfdec/swfdec_security.h
...callback (url, 1, user_data); return; } if (g_slist_find_custom (sec->crossdomain_denied, host, (GCompareFunc)g_ascii_strcasecmp)) { - callback (url, FALSE, user_data); + callback (url, 0, user_data); return; } @@ -183,17 +183,17 @@ swfdec_flash_security_allow_url (SwfdecSecurity *guard, const SwfdecURL *url, SwfdecURLAllowFunc callback, gpointer user_data) { SwfdecFlashSecurity *sec = SWFDEC_FLASH_SECURITY (guard); - gboolean allowed; + int status; switch (sec->sandbox) { case SWFDEC_SANDBOX_NONE: - allowed = FALSE; + status = 0;...
2007 Nov 08
0
11 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c libswfdec/swfdec_resource_request.c
...ce_request_free (request); + return; + } g_assert (player->resource); loader = swfdec_player_request_resource_now (player, request->security, request->url, request->request, request->buffer); @@ -122,6 +128,56 @@ swfdec_player_request_resource (SwfdecPlayer *player, SwfdecSecurity *security, player->resource_requests = g_slist_append (player->resource_requests, request); } +static gboolean +is_ascii (const char *s) +{ + while (*s) { + if (*s & 0x80) + return FALSE; + s++; + } + return TRUE; +} + +/** + * swfdec_player_request_fscommand: + * @...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...wfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_audio_internal.h" @@ -1656,10 +1657,29 @@ SwfdecLoader * swfdec_player_load (SwfdecPlayer *player, const char *url, SwfdecLoaderRequest request, SwfdecBuffer *buffer) { + SwfdecAsContext *cx; + SwfdecSecurity *sec; + SwfdecURL *full; + g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); g_return_val_if_fail (url != NULL, NULL); g_assert (player->resource); + /* create absolute url first */ + full = swfdec_url_new_relative (swfdec_loader_get_url (player->resource->loader), u...
2007 Nov 01
0
3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
...nterpret.c @@ -1151,16 +1151,8 @@ swfdec_action_get_url (SwfdecAsContext *cx, guint action, const guint8 *data, gu SWFDEC_ERROR ("GetURL without a SwfdecPlayer"); } else if (swfdec_player_fscommand (SWFDEC_PLAYER (cx), url, target)) { /* nothing to do here */ - } else { - SwfdecSecurity *sec = cx->frame->security; - SwfdecSpriteMovie *movie = swfdec_player_get_level (SWFDEC_PLAYER (cx), target, - SWFDEC_IS_RESOURCE (sec) ? SWFDEC_RESOURCE (sec) : NULL); - if (movie) { - swfdec_sprite_movie_load (movie, url, SWFDEC_LOADER_REQUEST_DEFAULT, NULL); - } else { -...
2007 Nov 09
0
10 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_loader.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h
...wfdecResourceFunc func, gpointer data, GDestroyNotify destroy); -gboolean swfdec_player_request_fscommand (SwfdecPlayer * player, - const char * command, - const char * value); SwfdecLoader * swfdec_player_request_resource_now (SwfdecPlayer * player, SwfdecSecurity * security, const char * url, SwfdecLoaderRequest req, SwfdecBuffer * buffer); +void swfdec_player_request_unload (SwfdecPlayer * player, + const char * target); +gboolean swfdec_player_request_fscommand (SwfdecPlayer * player, + const char * com...
2008 Jan 21
0
70 commits - configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_socket.c libswfdec-gtk/swfdec_gtk_socket.h libswfdec-gtk/swfdec_playback_alsa.c
...ec/swfdec_flash_security.c @@ -23,7 +23,6 @@ #include <string.h> #include "swfdec_flash_security.h" -#include "swfdec_policy_loader.h" #include "swfdec_debug.h" #include "swfdec_security_allow.h" @@ -47,227 +46,10 @@ swfdec_flash_security_allow (SwfdecSecurity *guard, SwfdecSecurity *key) } } -static gboolean -swfdec_flash_security_match_domain (const SwfdecURL *guard, const SwfdecURL *key) -{ - return g_ascii_strcasecmp (swfdec_url_get_host (guard), swfdec_url_get_host (key)) == 0; -} - -typedef struct { - SwfdecURL * url; - SwfdecURLAllowF...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...h +++ b/libswfdec/swfdec_as_internal.h @@ -34,11 +34,16 @@ G_BEGIN_DECLS SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret); -void swfdec_as_function_set_constructor (SwfdecAsFunction * fun); -void swfdec_as_function_set_security (SwfdecAsFunction * fun, - SwfdecSecurity * sec); -void swfdec_as_function_init_context (SwfdecAsContext * context, - guint version); +void swfdec_as_function_set_constructor (SwfdecAsFunction * fun); +void swfdec_as_function_set_security (SwfdecAsFunction * fun, + SwfdecSecurity * sec); +void swfdec_as_function_in...
2007 Nov 30
0
36 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_flash_security.c
...rl != NULL); data = g_new (AllowCallbackData, 1); data->player = player; diff --git a/libswfdec/swfdec_security.c b/libswfdec/swfdec_security.c index 35d4655..a41f510 100644 --- a/libswfdec/swfdec_security.c +++ b/libswfdec/swfdec_security.c @@ -76,12 +76,11 @@ swfdec_security_allow_url (SwfdecSecurity *guard, const SwfdecURL *url, { SwfdecSecurityClass *klass; - // FIXME - g_return_if_fail (SWFDEC_IS_SECURITY (guard)); - g_return_if_fail (url != NULL); + g_assert (SWFDEC_IS_SECURITY (guard)); + g_assert (url != NULL); klass = SWFDEC_SECURITY_GET_CLASS (guard); - g_return_if_f...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...i++) { *out = ((gint16) *in << 8) ^ (-1); diff --git a/libswfdec/swfdec_flash_security.c b/libswfdec/swfdec_flash_security.c index 5f31d4a..03f15a4 100644 --- a/libswfdec/swfdec_flash_security.c +++ b/libswfdec/swfdec_flash_security.c @@ -217,6 +217,8 @@ swfdec_flash_security_allow_url (SwfdecSecurity *guard, const SwfdecURL *url, break; default: g_assert_not_reached (); + allowed = FALSE; + break; } callback (url, allowed, user_data); diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index ee200d9..be63312 100644 --- a/libswfdec/swfdec_imag...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...n't crash when the context was aborted diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index a5f7866..cc6be1a 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -1113,6 +1113,8 @@ swfdec_as_object_call_with_security (SwfdecAsObject *object, SwfdecSecurity *sec if (!SWFDEC_IS_AS_FUNCTION (fun)) return; swfdec_as_function_call (fun, object, argc, argv, return_value ? return_value : &tmp); + if (swfdec_as_context_is_aborted (object->context)) + return; swfdec_as_frame_set_security (object->context->frame, sec); swfd...
2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...ha_new (guint type) { SwfdecCodecVp6Alpha *vp6; diff --git a/libswfdec/swfdec_flash_security.c b/libswfdec/swfdec_flash_security.c index 70cb7cf..432976a 100644 --- a/libswfdec/swfdec_flash_security.c +++ b/libswfdec/swfdec_flash_security.c @@ -70,9 +70,9 @@ swfdec_flash_security_allow_url (SwfdecSecurity *guard, const SwfdecURL *url) return !swfdec_url_is_local (url); case SWFDEC_SANDBOX_LOCAL_TRUSTED: return TRUE; + default: + g_return_val_if_reached (FALSE); } - g_assert_not_reached (); - return FALSE; } static void diff --git a/libswfdec/swfdec_flv_decoder....
2007 Nov 15
2
Changes to 'refs/tags/0.5.4'
Tag '0.5.4' created by Benjamin Otte <otte at gnome.org> at 2007-11-15 10:12 -0800 release 0.5.4 ("Turkish Cycling Federation") -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHPBurvMv5VCdLq8QRAj1KAJ40NHRRS3gKyJjSjyyoH7gDaGi/tQCeOha/ R5PF4bZQqmSdJ64t8EbD4cA= =8qBy -----END PGP SIGNATURE----- Changes since the dawn of time: Benjamin Otte (40):
2007 Nov 15
0
4 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c test/trace
...* super; /* super object in current frame or NULL if none */ gboolean construct; /* TRUE if this is the constructor for thisp */ @@ -40,9 +41,6 @@ struct _SwfdecAsFrame { guint argc; /* number of arguments */ const SwfdecAsValue * argv; /* arguments or %NULL if taken from stack */ SwfdecSecurity * security; /* security for this frame or %NULL if not allowed to call */ - SwfdecAsFunction * caller; /* the function that made the call or %NULL */ - SwfdecAsFunction * callee; /* the function being called or %NULL */ - gboolean update_caller; /* whether callee should be used as a caller...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...gt;resource_requests = NULL; + list = player->priv->resource_requests; + player->priv->resource_requests = NULL; g_slist_foreach (list, swfdec_request_resource_perform_one, player); g_slist_free (list); } @@ -201,7 +201,7 @@ swfdec_player_request_resource (SwfdecPlayer *player, SwfdecSecurity *security, request->destroy = destroy; request->data = data; - player->resource_requests = g_slist_append (player->resource_requests, request); + player->priv->resource_requests = g_slist_append (player->priv->resource_requests, request); } static gboolean @...
2007 Nov 10
0
10 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c
...{ SWFDEC_RESOURCE_REQUEST_LOAD, @@ -39,14 +40,15 @@ struct _SwfdecResourceRequest { SwfdecResourceRequestType type; /* type of request */ + GDestroyNotify destroy; /* function to call on player dispose */ + gpointer data; /* function to pass to the above functions */ + /* LOAD */ SwfdecSecurity * security; /* security context when loading or NULL for fscommand */ char * url; /* URL we're gonna load */ SwfdecLoaderRequest request; /* how are we goona load this URL? */ SwfdecBuffer * buffer; /* data to pass to load request or NULL */ SwfdecResourceFunc func; /* f...
2007 Oct 23
0
11 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h
...ibswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h index 98cb9ee..15780b8 100644 --- a/libswfdec/swfdec_as_internal.h +++ b/libswfdec/swfdec_as_internal.h @@ -71,6 +71,10 @@ void swfdec_as_object_run_with_security (SwfdecAsObject * object, SwfdecScript * script, SwfdecSecurity * sec); +void swfdec_as_object_add_native_variable (SwfdecAsObject * object, + const char * variable, + SwfdecAsNative get, + SwfdecAsNative set); G_END_DECLS diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 765a56c..3da723a 100644 --- a/l...
2007 Nov 27
0
12 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h
..._STR_EMPTY); } + + /* unroot */ + swfdec_player_unroot_object (SWFDEC_PLAYER ( + SWFDEC_AS_OBJECT (load_object)->context), G_OBJECT (load_object)); } static void @@ -196,54 +179,51 @@ swfdec_load_object_load (SwfdecLoadObject *load_object, const char *url, { SwfdecPlayer *player; SwfdecSecurity *sec; - SwfdecAsValue val; g_return_val_if_fail (SWFDEC_IS_LOAD_OBJECT (load_object), FALSE); g_return_val_if_fail (url != NULL, FALSE); player = SWFDEC_PLAYER (SWFDEC_AS_OBJECT (load_object)->context); swfdec_load_object_reset (load_object); + /* get the current security...