summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed8d9ad)
* test more thoroughly if we're realy logged in
* print citserver version from configure
*/
void cmd_mgsve_caps(void)
{
*/
void cmd_mgsve_caps(void)
{
- cprintf("\"IMPLEMENTATION\" \"CITADEL Sieve v6.84\"\r\n" /* TODO: put citversion here. */
+ cprintf("\"IMPLEMENTATION\" \"CITADEL Sieve " PACKAGE_VERSION "\"\r\n"
"\"SASL\" \"PLAIN\"\r\n" /*DIGEST-MD5 GSSAPI SASL sucks.*/
#ifdef HAVE_OPENSSL
/* if TLS is already there, should we say that again? */
"\"SASL\" \"PLAIN\"\r\n" /*DIGEST-MD5 GSSAPI SASL sucks.*/
#ifdef HAVE_OPENSSL
/* if TLS is already there, should we say that again? */
strcpy(CC->cs_clientname, "Managesieve session");
strcpy(CC->cs_clientname, "Managesieve session");
CC->cs_flags |= CS_STEALTH;
CC->session_specific_data = malloc(sizeof(struct citmgsve));
memset(MGSVE, 0, sizeof(struct citmgsve));
CC->cs_flags |= CS_STEALTH;
CC->session_specific_data = malloc(sizeof(struct citmgsve));
memset(MGSVE, 0, sizeof(struct citmgsve));
{
char auth[SIZ];
int retval;
{
char auth[SIZ];
int retval;
- char *message = ReadString(GetSizeToken(parms[2]), parms[0]);
+ char *message;
+
+ message = NULL;
+ if (parms[2][0] == '{')
+ message = ReadString(GetSizeToken(parms[2]), parms[0]);
if (message != NULL) {/**< do we have tokenized login? */
retval = CtdlDecodeBase64(auth, MGSVE->transmitted_message, SIZ);
if (message != NULL) {/**< do we have tokenized login? */
retval = CtdlDecodeBase64(auth, MGSVE->transmitted_message, SIZ);
cprintf("NO \"Authentication Failure.\"\r\n");/* we just support auth plain. */
CC->kill_me = 1;
}
cprintf("NO \"Authentication Failure.\"\r\n");/* we just support auth plain. */
CC->kill_me = 1;
}
cmd_mgsve_caps();
}
/** these commands need to be authenticated. throw it out if it tries. */
cmd_mgsve_caps();
}
/** these commands need to be authenticated. throw it out if it tries. */
- else if (!CtdlAccessCheck(ac_logged_in))
+ else if (CC->logged_in != 0)
{
msiv_load(&u);
if ((length>= 9) && (!strncasecmp(parms[0], "HAVESPACE", 9))){
{
msiv_load(&u);
if ((length>= 9) && (!strncasecmp(parms[0], "HAVESPACE", 9))){
msiv_store(&u, changes_made);
}
else {
msiv_store(&u, changes_made);
}
else {
+ cprintf("No Invalid access or command.\r\n");
lprintf(CTDL_INFO, "illegal Managesieve command: %s", parms[0]);
CC->kill_me = 1;
}
lprintf(CTDL_INFO, "illegal Managesieve command: %s", parms[0]);
CC->kill_me = 1;
}