Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Epiphany
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
132
Issues
132
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
Epiphany
Commits
66053f00
Commit
66053f00
authored
Feb 04, 2010
by
Xan Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SoupCookieJarAcceptPolicy match our cookie policies
Bug #607484
parent
3fd99f85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
6 deletions
+71
-6
configure.ac
configure.ac
+1
-1
embed/ephy-embed-prefs.c
embed/ephy-embed-prefs.c
+60
-1
embed/ephy-embed-prefs.h
embed/ephy-embed-prefs.h
+5
-3
embed/ephy-embed-single.c
embed/ephy-embed-single.c
+5
-0
embed/ephy-embed-utils.c
embed/ephy-embed-utils.c
+0
-1
No files found.
configure.ac
View file @
66053f00
...
...
@@ -101,7 +101,7 @@ LIBSTARTUP_NOTIFICATION_REQUIRED=0.5
LIBNOTIFY_REQUIRED=0.4
DBUS_GLIB_REQUIRED=0.35
WEBKIT_GTK_REQUIRED=1.1.19
LIBSOUP_GNOME_REQUIRED=2.29.
4
LIBSOUP_GNOME_REQUIRED=2.29.
90
GNOME_KEYRING_REQUIRED=2.26.0
PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])
...
...
embed/ephy-embed-prefs.c
View file @
66053f00
...
...
@@ -329,6 +329,62 @@ webkit_pref_callback_accept_languages (GConfClient *client,
g_free
(
langs_str
);
}
void
ephy_embed_prefs_set_cookie_jar_policy
(
SoupCookieJar
*
jar
,
const
char
*
gconf_policy
)
{
SoupCookieJarAcceptPolicy
policy
;
g_return_if_fail
(
SOUP_IS_COOKIE_JAR
(
jar
));
g_return_if_fail
(
gconf_policy
!=
NULL
);
if
(
g_str_equal
(
gconf_policy
,
"nowhere"
))
policy
=
SOUP_COOKIE_JAR_ACCEPT_NEVER
;
else
if
(
g_str_equal
(
gconf_policy
,
"anywhere"
))
policy
=
SOUP_COOKIE_JAR_ACCEPT_ALWAYS
;
else
if
(
g_str_equal
(
gconf_policy
,
"current site"
))
policy
=
SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY
;
else
{
g_warn_if_reached
();
return
;
}
g_object_set
(
G_OBJECT
(
jar
),
SOUP_COOKIE_JAR_ACCEPT_POLICY
,
policy
,
NULL
);
}
static
void
webkit_pref_callback_cookie_accept_policy
(
GConfClient
*
client
,
guint
cnxn_id
,
GConfEntry
*
entry
,
gpointer
data
)
{
SoupSession
*
session
;
char
*
webkit_pref
;
GConfValue
*
gcvalue
;
const
char
*
value
=
NULL
;
webkit_pref
=
data
;
gcvalue
=
gconf_entry_get_value
(
entry
);
/* happens on initial notify if the key doesn't exist */
if
(
gcvalue
!=
NULL
&&
gcvalue
->
type
==
GCONF_VALUE_STRING
)
{
value
=
gconf_value_get_string
(
gcvalue
);
}
if
(
value
)
{
SoupSessionFeature
*
jar
;
session
=
webkit_get_default_session
();
jar
=
soup_session_get_feature
(
session
,
SOUP_TYPE_COOKIE_JAR
);
if
(
!
jar
)
return
;
ephy_embed_prefs_set_cookie_jar_policy
(
SOUP_COOKIE_JAR
(
jar
),
value
);
}
}
static
const
PrefData
webkit_pref_entries
[]
=
{
{
CONF_RENDERING_FONT_MIN_SIZE
,
...
...
@@ -372,7 +428,10 @@ static const PrefData webkit_pref_entries[] =
webkit_pref_callback_accept_languages
},
{
CONF_USER_AGENT
,
"user-agent"
,
webkit_pref_callback_user_agent
}
webkit_pref_callback_user_agent
},
{
CONF_SECURITY_COOKIES_ACCEPT
,
"accept-policy"
,
webkit_pref_callback_cookie_accept_policy
}
};
static
void
...
...
embed/ephy-embed-prefs.h
View file @
66053f00
...
...
@@ -72,9 +72,11 @@
G_BEGIN_DECLS
void
ephy_embed_prefs_init
(
void
);
void
ephy_embed_prefs_shutdown
(
void
);
void
ephy_embed_prefs_add_embed
(
EphyEmbed
*
embed
);
void
ephy_embed_prefs_init
(
void
);
void
ephy_embed_prefs_shutdown
(
void
);
void
ephy_embed_prefs_add_embed
(
EphyEmbed
*
embed
);
void
ephy_embed_prefs_set_cookie_jar_policy
(
SoupCookieJar
*
jar
,
const
char
*
gconf_policy
);
G_END_DECLS
...
...
embed/ephy-embed-single.c
View file @
66053f00
...
...
@@ -23,6 +23,7 @@
#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
#define NSPLUGINWRAPPER_SETUP "/usr/bin/mozilla-plugin-config"
#include "eel-gconf-extensions.h"
#include "ephy-embed-single.h"
#include "ephy-embed-prefs.h"
#include "ephy-embed-type-builtins.h"
...
...
@@ -470,6 +471,7 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
SoupSession
*
session
;
SoupCookieJar
*
jar
;
char
*
filename
;
char
*
cookie_policy
;
/* Initialise nspluginwrapper's plugins if available */
if
(
g_file_test
(
NSPLUGINWRAPPER_SETUP
,
G_FILE_TEST_EXISTS
)
!=
FALSE
)
...
...
@@ -483,6 +485,9 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
filename
=
g_build_filename
(
ephy_dot_dir
(),
"cookies.sqlite"
,
NULL
);
jar
=
soup_cookie_jar_sqlite_new
(
filename
,
FALSE
);
g_free
(
filename
);
cookie_policy
=
eel_gconf_get_string
(
CONF_SECURITY_COOKIES_ACCEPT
);
ephy_embed_prefs_set_cookie_jar_policy
(
jar
,
cookie_policy
);
g_free
(
cookie_policy
);
soup_session_add_feature
(
session
,
SOUP_SESSION_FEATURE
(
jar
));
g_object_unref
(
jar
);
...
...
embed/ephy-embed-utils.c
View file @
66053f00
...
...
@@ -19,7 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id:
*/
#include "config.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment