Displaying 3 results from an estimated 3 matches for "gpatternspec".
2007 Dec 05
0
4 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_policy_loader.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
...SwfdecXmlNode *node_cdp =
@@ -90,6 +93,8 @@ swfdec_policy_loader_check (SwfdecAsContext *context, const char *text,
for (j = 0; j < swfdec_xml_node_num_children (node_cdp); j++) {
SwfdecXmlNode *node_aaf = swfdec_xml_node_get_child (node_cdp, j);
const char *value;
+ GPatternSpec *pattern;
+ char *value_lower;
if (node_aaf->type != SWFDEC_XML_NODE_ELEMENT)
continue;
@@ -100,10 +105,10 @@ swfdec_policy_loader_check (SwfdecAsContext *context, const char *text,
// FIXME: secure attribute?
value = swfdec_xml_node_get_attribute (node_aaf, SWFDE...
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
...(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_POLICY_FILE))
@@ -45,6 +44,8 @@ struct _SwfdecPolicyFile {
SwfdecURL * url; /* parent url we check with */
SwfdecLoader * stream; /* stream we are loading or NULL if done loading */
GSList * allowed_hosts; /* list of GPatternSpec of the allowed hosts */
+
+ GSList * requests; /* requests waiting for this file to finish loading */
};
struct _SwfdecPolicyFileClass {
@@ -59,12 +60,6 @@ gboolean swfdec_policy_file_is_loading (SwfdecPolicyFile * file);
gboolean swfdec_policy_file_allow (SwfdecPolicyFile * file,
co...
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
...@@ -97,15 +100,31 @@ swfdec_policy_loader_check (SwfdecAsContext *context, const char *text,
value = swfdec_xml_node_get_attribute (node_aaf, SWFDEC_AS_STR_domain);
if (value != NULL) {
- if (!strcmp (value, "*"))
- return TRUE;
- if (!g_ascii_strcasecmp (value, host))
+ GPatternSpec *pattern;
+ char *value_lower;
+
+ // GPatternSpec uses ? as a wildcard character, but we won't
+ // And there can't be a host that has ? character
+ if (strchr (value, '?') != NULL)
+ continue;
+
+ value_lower = g_ascii_strdown (value, -1);
+ pattern = g_pattern_spec_new (value_l...