diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-10-27 21:07:45 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-10-27 21:07:45 -0600 |
commit | 248f45578fcf93b56e3b97c52cfd21b5b84f2a38 (patch) | |
tree | 411f3e2e25ebe1e33cbff4994477dc7a18dfa38f /web | |
parent | 4e924cc7aeb4edceb84d43d97f0542539f614cdd (diff) | |
download | alpine-248f45578fcf93b56e3b97c52cfd21b5b84f2a38.tar.xz |
* Contributions by Thomas Uhle:
. Add support to the LDAP attribute "userCertificate";
. Move voiceMailTelephoneNumber from the TCL side to ldap_translate;
. XOAUTH2 state generator changes format specifier from %x to %02x;
. Clear compiler warnings and correct spelling in documentation.
. Web Alpine will not attempt to continue a postponed message if the
postponed-msgs folder is empty.
Diffstat (limited to 'web')
-rwxr-xr-x | web/cgi/alpine/1.0/ldapentry.tcl | 18 | ||||
-rw-r--r-- | web/src/alpined.d/alpined.c | 26 |
2 files changed, 32 insertions, 12 deletions
diff --git a/web/cgi/alpine/1.0/ldapentry.tcl b/web/cgi/alpine/1.0/ldapentry.tcl index a483f165..a66d7deb 100755 --- a/web/cgi/alpine/1.0/ldapentry.tcl +++ b/web/cgi/alpine/1.0/ldapentry.tcl @@ -216,9 +216,6 @@ WPEval $ldap_vars { name { continue; } - voicemailtelephonenumber { - set fieldname "Voice Mail" - } "email address" { set do_email 1 set fieldname [lindex $item 0] @@ -232,12 +229,15 @@ WPEval $ldap_vars { } } - set itematt "" + set vals [list ""] if {[llength $item] > 2} { set itematt [lindex $item 2] - } - if {$itematt == "objectclass"} { set vals [lindex $item 1] + } else { + set itematt [lindex $item 1] + } + + if {[lsearch -exact $itematt "objectclass"] >= 0} { continue } @@ -249,8 +249,6 @@ WPEval $ldap_vars { set bgwhite 1 } - set vals [lindex $item 1] - cgi_table_row bgcolor=$bgcolor { cgi_table_data width=25% nowrap valign=top rowspan=[llength $vals] { cgi_division "style=\"padding-top:2\"" { @@ -276,6 +274,8 @@ WPEval $ldap_vars { unset do_fax } elseif {[info exists do_email]} { cgi_puts [cgi_url [cgi_font size=-1 face=courier [lindex $vals 0]] compose.tcl?ldap=1&dir=${dir}&qn=${qn}&si=${si}&ni=${ni}&ei=0&cid=[WPCmd PEInfo key]&oncancel=addrbook] + } elseif {[lsearch -exact -nocase $itematt "binary"] >= 0} { + cgi_puts "[ Binary Data ]" } else { cgi_puts [lindex $vals 0] } @@ -291,6 +291,8 @@ WPEval $ldap_vars { cgi_table_data height=20px { if {[info exists do_email]} { cgi_puts [cgi_url [cgi_font size=-1 face=courier $extra] compose.tcl?ldap=1&dir=${dir}&qn=${qn}&si=${si}&ni=${ni}&ei=[incr ei]&cid=[WPCmd PEInfo key]&oncancel=addrbook] + } elseif {[lsearch -exact -nocase $itematt "binary"] >= 0} { + cgi_puts "[ Binary Data ]" } else { cgi_puts $extra } diff --git a/web/src/alpined.d/alpined.c b/web/src/alpined.d/alpined.c index ad05aa9a..4c6f1e56 100644 --- a/web/src/alpined.d/alpined.c +++ b/web/src/alpined.d/alpined.c @@ -12040,7 +12040,7 @@ PEPostponeCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONS if(!strcmp(s1, "any")){ MAILSTREAM *stream; - if(postponed_stream(&stream, wps_global->VAR_POSTPONED_FOLDER, "Postponed", 0) && stream){ + if(postponed_stream(&stream, wps_global->VAR_POSTPONED_FOLDER, "Postponed", 1) && stream){ Tcl_SetResult(interp, "1", TCL_STATIC); if(stream != wps_global->mail_stream) @@ -12109,6 +12109,8 @@ PEPostponeCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONS if(stream != wps_global->mail_stream) pine_mail_close(stream); } + else + Tcl_SetResult(interp, "", TCL_STATIC); return(TCL_OK); } @@ -15217,7 +15219,7 @@ PELdapCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST ob if(!strcmp(s1, "ldapext")){ /* * Returns a list of the form: - * {"dn" {{attrib {val, ...}}, ...}} + * {"dn" {{attrib {val, ...} {opt, ...}}, ...}} */ char *whichrec = Tcl_GetStringFromObj(objv[3], NULL); char *tmpstr, *tmp, *tmp2, *a; @@ -15302,12 +15304,28 @@ PELdapCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST ob ldap_value_free_len(vals); if(Tcl_ListObjAppendElement(interp, secObj, resObj) != TCL_OK) return(TCL_ERROR); + resObj = Tcl_NewListObj(0, NULL); } - if(!strcmp(a,"objectclass")){ - if(Tcl_ListObjAppendElement(interp, secObj, + if(!strucmp(a, "objectclass")){ + if(Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("objectclass", -1)) != TCL_OK) return(TCL_ERROR); } + for(tmp = strchr(a, ';'); tmp != NULL; tmp = tmp2){ + int retval; + + tmp2 = strchr(++tmp, ';'); + if(tmp2) + *tmp2 = '\0'; + retval = Tcl_ListObjAppendElement(interp, resObj, + Tcl_NewStringObj(tmp, -1)); + if(tmp2) + *tmp2 = ';'; + if(retval != TCL_OK) + return(TCL_ERROR); + } + if(Tcl_ListObjAppendElement(interp, secObj, resObj) != TCL_OK) + return(TCL_ERROR); if(Tcl_ListObjAppendElement(interp, itemObj, secObj) != TCL_OK) return(TCL_ERROR); } |