summaryrefslogtreecommitdiff
path: root/WebMail.c
diff options
context:
space:
mode:
Diffstat (limited to 'WebMail.c')
-rw-r--r--WebMail.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/WebMail.c b/WebMail.c
index f7ba786..4c3d3f8 100644
--- a/WebMail.c
+++ b/WebMail.c
@@ -1006,7 +1006,7 @@ int ViewWebMailMessage(struct HTTPConnectionInfo * Session, char * Reply, int Nu
if (Msg == NULL)
{
ptr += sprintf(ptr, "Message %d not found\r\n", Number);
- return sprintf(Reply, WebMailTemplate, BBSName, User->Call, Key, Key, Key, Key, Key, Key, Key, Message);
+ return sprintf(Reply, WebMailTemplate, BBSName, User->Call, Key, Key, Key, Key, Key, Key, Key, Key, Key, Key, Message);
}
// New Display so free any old values
@@ -1019,7 +1019,7 @@ int ViewWebMailMessage(struct HTTPConnectionInfo * Session, char * Reply, int Nu
if (!CheckUserMsg(Msg, User->Call, User->flags & F_SYSOP))
{
ptr += sprintf(ptr, "Message %d not for you\r", Number);
- return sprintf(Reply, WebMailTemplate, BBSName, User->Call, Key, Key, Key, Key, Key, Key, Key, Message);
+ return sprintf(Reply, WebMailTemplate, BBSName, User->Call, Key, Key, Key, Key, Key, Key, Key, Key, Key, Key, Message);
}
if (_stricmp(Msg->to, "RMS") == 0)
@@ -1995,10 +1995,10 @@ void ProcessWebMailMessage(struct HTTPConnectionInfo * Session, char * Key, BOOL
" if (\"WebSocket\" in window)"
" {"
" // open a web socket. Get address from URL\r\n"
- " var text = window.location.href;"
- " var result = text.substring(7);"
- " var myArray = result.split('/', 1);"
- " ws = new WebSocket('ws://' + myArray[0] + '/WMRefresh&%s');\r\n"
+
+ " var proto = (window.location.protocol === 'https:') ? 'wss://' : 'ws://';\r\n"
+ " ws = new WebSocket(proto + window.location.host + '/WMRefresh&%s');\r\n"
+
" ws.onopen = function() {\r\n"
@@ -2191,7 +2191,7 @@ void ProcessWebMailMessage(struct HTTPConnectionInfo * Session, char * Key, BOOL
EncodedTitle = doXMLTransparency(Msg->title);
- *RLen = sprintf(Reply, MsgInputPage, Key, Msg->from, Temp, EncodedTitle , "");
+ *RLen = sprintf(Reply, MsgInputPage, Key, ReplyAddr, Temp, EncodedTitle , "");
free(EncodedTitle);
return;