* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 736 /* This version */
+#define REV_LEVEL 737 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
-#define EXPORT_REV_MIN 733 /* Oldest compatible export files */
+#define EXPORT_REV_MIN 737 /* Oldest compatible export files */
#define LIBCITADEL_MIN 115 /* Minimum required version of libcitadel */
#define SERVER_TYPE 0 /* zero for stock Citadel; other developers please
cprintf("1\n"); /* yes, Sieve mail filtering is supported */
cprintf("%d\n", config.c_enable_fulltext);
cprintf("%s\n", svn_revision());
+
+ if (config.c_auth_mode == AUTHMODE_NATIVE) {
+ cprintf("1\n"); /* OpenID is enabled when using native auth */
+ }
+ else {
+ cprintf("0\n"); /* OpenID is disabled when using non-native auth */
+ }
cprintf("000\n");
}
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
AC_PREREQ(2.52)
-AC_INIT([Citadel], [7.36], [http://www.citadel.org/])
+AC_INIT([Citadel], [7.37], [http://www.citadel.org/])
AC_REVISION([$Revision: 5108 $])
AC_CONFIG_SRCDIR([citserver.c])
AC_PREFIX_DEFAULT(/usr/local/citadel)
svput("NEWUSER_BUTTON_POST", WCS_STRING, "");
}
- if (1) { // FIXME we have to check whether the server offers openid
+ if (serv_info.serv_supports_openid) {
svprintf(HKEY("OFFER_OPENID_LOGIN"), WCS_STRING,
"<div align=center>"
"<a href=\"display_openid_login\">"
if (havebstr("openid.mode")) {
if (!strcasecmp(bstr("openid.mode"), "id_res")) {
- // FIXME id accepted but the code isn't finished
serv_puts("OIDF");
serv_getln(buf, sizeof buf);
svput("BOXTITLE", WCS_STRING, _("Manage Account/OpenID Associations"));
do_template("beginbox");
- wprintf("<table class=\"altern\">");
-
- serv_puts("OIDL");
- serv_getln(buf, sizeof buf);
- if (buf[0] == '1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
- bg = 1 - bg;
- wprintf("<tr class=\"%s\">", (bg ? "even" : "odd"));
- wprintf("<td><img src=\"static/openid-small.gif\"></td><td>");
- escputs(buf);
- wprintf("</td><td>");
- wprintf("<a href=\"openid_detach?id_to_detach=");
- urlescputs(buf);
- wprintf("\" onClick=\"return confirm('%s');\">",
- _("Do you really want to delete this OpenID?"));
- wprintf("%s</a>", _("(delete)"));
- wprintf("</td></tr>\n");
+ if (serv_info.serv_supports_openid) {
+
+ wprintf("<table class=\"altern\">");
+
+ serv_puts("OIDL");
+ serv_getln(buf, sizeof buf);
+ if (buf[0] == '1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
+ bg = 1 - bg;
+ wprintf("<tr class=\"%s\">", (bg ? "even" : "odd"));
+ wprintf("<td><img src=\"static/openid-small.gif\"></td><td>");
+ escputs(buf);
+ wprintf("</td><td>");
+ wprintf("<a href=\"openid_detach?id_to_detach=");
+ urlescputs(buf);
+ wprintf("\" onClick=\"return confirm('%s');\">",
+ _("Do you really want to delete this OpenID?"));
+ wprintf("%s</a>", _("(delete)"));
+ wprintf("</td></tr>\n");
+ }
+
+ wprintf("</table><br />\n");
+
+ wprintf("<form method=\"POST\" action=\"openid_attach\">\n");
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+ wprintf(_("Add an OpenID: "));
+ wprintf("<input type=\"text\" name=\"openid_url\" class=\"openid_urlarea\" size=\"40\">\n");
+ wprintf("<input type=\"submit\" name=\"attach_button\" value=\"%s\">"
+ "</form></center>\n", _("Attach"));
}
- wprintf("</table><br />\n");
+ else {
+ wprintf(_("%s does not permit authentication via OpenID."), serv_info.serv_humannode);
+ }
- wprintf("<form method=\"POST\" action=\"openid_attach\">\n");
- wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
- wprintf(_("Add an OpenID: "));
- wprintf("<input type=\"text\" name=\"openid_url\" class=\"openid_urlarea\" size=\"40\">\n");
- wprintf("<input type=\"submit\" name=\"attach_button\" value=\"%s\">"
- "</form></center>\n", _("Attach"));
do_template("endbox");
wprintf("</div>");
wDumpContent(2);
case 22:
safestrncpy(serv_info.serv_svn_revision, buf, sizeof serv_info.serv_svn_revision);
break;
+ case 23:
+ serv_info.serv_supports_openid = atoi(buf);
+ break;
}
++a;
}
#define PORT_NUM 2000 /* port number to listen on */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 736 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 730 /* min required Citadel ver */
-#define LIBCITADEL_MIN 114 /* min required libcitadel ver */
+#define CLIENT_VERSION 737 /* This version of WebCit */
+#define MINIMUM_CIT_VERSION 737 /* min required Citadel ver */
+#define LIBCITADEL_MIN 115 /* min required libcitadel ver */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define LB (1) /* Internal escape chars */
int serv_supports_sieve; /* Does the server support Sieve mail filtering? */
int serv_fulltext_enabled; /* Does the server have the full text index enabled? */
char serv_svn_revision[256]; /* SVN revision of the server */
+ int serv_supports_openid; /* Does the server support authentication via OpenID? */
};