OpenBrowser length limit

Posted by Fiendish on Tue 26 Jul 2011 09:23 PM — 3 posts, 10,066 views.

USA Global Moderator #0
OpenBrowser appears to have a length limit of 259 characters, which is not a reasonable limitation. The maximum size allowed (if any) should be much higher than that.
Amended on Tue 26 Jul 2011 09:28 PM by Fiendish
Australia Forum Administrator #1
Where do you see that limitation in the source?


long CMUSHclientDoc::OpenBrowser(LPCTSTR URL) 
{
CString strAction = URL;

    if (strAction.IsEmpty ())
      return eBadParameter;

    // don't let them slip in arbitrary OS commands
    if (strAction.Left (7).CompareNoCase ("http://") != 0 &&
        strAction.Left (8).CompareNoCase ("https://") != 0 &&
        strAction.Left (7).CompareNoCase ("mailto:") != 0)
      return eBadParameter;

    if ((long) ShellExecute (Frame, _T("open"), strAction, NULL, NULL, SW_SHOWNORMAL) <= 32)
      return eCouldNotOpenFile;

	return eOK;
}   // end of CMUSHclientDoc::OpenBrowser

USA Global Moderator #2
I didn't look at the source, I found the problem in practice. Never mind. It looks like it's yet another wine bug. *sigh*