From 485379ccd51068a98987c35d296a81e0e410329b Mon Sep 17 00:00:00 2001 From: pinkerton Date: Thu, 4 Jun 1998 17:46:27 +0000 Subject: [PATCH] Support for single sigon and cookie management features. --- cmd/macfe/central/uprefd.h | 2 ++ cmd/macfe/gui/CHTMLView.cp | 12 +++++++++++- cmd/macfe/restext/custom.r | 2 ++ cmd/macfe/utility/xp_file_mac.cp | 14 ++++++++++++++ config/mac/DefinesMozilla.h | 6 +++--- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/cmd/macfe/central/uprefd.h b/cmd/macfe/central/uprefd.h index f2b127e86254..ff11038f6097 100644 --- a/cmd/macfe/central/uprefd.h +++ b/cmd/macfe/central/uprefd.h @@ -550,4 +550,6 @@ enum pref_Strings { prefFolderName = 1 , profileTemplateDir = 49 , cryptoPolicy = 50 , signedAppletDb = 51 + , cookiePermissions = 52 + , singleSignons = 53 }; diff --git a/cmd/macfe/gui/CHTMLView.cp b/cmd/macfe/gui/CHTMLView.cp index 306f3173e22e..ffa074177dd4 100644 --- a/cmd/macfe/gui/CHTMLView.cp +++ b/cmd/macfe/gui/CHTMLView.cp @@ -688,6 +688,12 @@ void MochaFormSubmitCallback(MWContext* pContext, LO_FormSubmitData* submit = LO_SubmitForm(pContext, (LO_FormElementStruct*)lo_element); if (submit == NULL) return; + + #ifdef SingleSignon + // Check for a password submission and remember the data if so + SI_RememberSignonData(pContext, submit); + #endif + URL_Struct* url = NET_CreateURLStruct((char *)submit->action, NET_DONT_RELOAD); CBrowserContext* context = ExtractBrowserContext(pContext); if (context) @@ -732,7 +738,11 @@ void MochaImageFormSubmitCallback(MWContext* pContext, try { theSubmit = LO_SubmitImageForm(pContext, data->lo_image, data->x, data->y); -// ThrowIfNULL_(theSubmit); + + #ifdef SingleSignon + // Check for a password submission and remember the data if so + SI_RememberSignonData(pContext, theSubmit); + #endif // 97-06-07 pkc -- NULL is a valid return value from LO_SubmitImageForm if (theSubmit) diff --git a/cmd/macfe/restext/custom.r b/cmd/macfe/restext/custom.r index 850ac3c42da7..2f8261e0bf9c 100644 --- a/cmd/macfe/restext/custom.r +++ b/cmd/macfe/restext/custom.r @@ -189,6 +189,8 @@ resource 'STR#' ( 300, "Pref file names", purgeable ) {{ "Defaults"; // 49 Template folder for new profiles "moz40p3"; // 50 Cryptographic policy file "SignedAppletDB"; // 51 Signed applet file + "Cookie Permissions"; // 52 Cookie permission file + "Single Signons"; // 53 Single Signon file }}; resource 'STR#' ( BUTTON_STRINGS_RESID, "Button Names", purgeable ) {{ diff --git a/cmd/macfe/utility/xp_file_mac.cp b/cmd/macfe/utility/xp_file_mac.cp index b5d3daab264c..4b21dc38e0d4 100644 --- a/cmd/macfe/utility/xp_file_mac.cp +++ b/cmd/macfe/utility/xp_file_mac.cp @@ -245,11 +245,25 @@ OSErr XP_FileSpec(const char *inName, XP_FileType type, FSSpec* outSpec) *outSpec = CPrefs::GetFilePrototype( CPrefs::MainFolder ); GetIndString(outSpec->name, 300, magicCookie); break; +#ifdef CookieManagement + case xpHTTPCookiePermission: + _ftype = emMagicCookie; // is this right? + *outSpec = CPrefs::GetFilePrototype( CPrefs::MainFolder ); + GetIndString(outSpec->name, 300, cookiePermissions); + break; +#endif case xpJSCookieFilters: _ftype = emTextType; *outSpec = CPrefs::GetFilePrototype( CPrefs::MainFolder ); *(CStr63*)(outSpec->name) = ":cookies.js"; break; +#ifdef SingleSignon + case xpHTTPSingleSignon: + _ftype = emMagicCookie; // is this right? + *outSpec = CPrefs::GetFilePrototype( CPrefs::MainFolder ); + GetIndString(outSpec->name, 300, singleSignons); + break; +#endif case xpProxyConfig: _ftype = emTextType; *outSpec = CPrefs::GetFilePrototype( CPrefs::MainFolder ); diff --git a/config/mac/DefinesMozilla.h b/config/mac/DefinesMozilla.h index f89dec509d79..32d56e27a8dc 100644 --- a/config/mac/DefinesMozilla.h +++ b/config/mac/DefinesMozilla.h @@ -31,9 +31,9 @@ //#define BETA // Comment out both ALPHA and BETA for the final version -// ΡΡΡ Do we have an editor? -// 98-03-10 pchen -- moved into Component_Config.h -// #define EDITOR +// 98-06-03 pinkerton -- temorary defines to turn on features before they fully land. +#define CookieManagement 1 +#define SingleSignon 1 // ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ // ₯ You typically will not need to change things below here