Issue 41037 - HTTP UCP: Problems with bad data in URLs
Summary: HTTP UCP: Problems with bad data in URLs
Status: ACCEPTED
Alias: None
Product: ucb
Classification: Code
Component: code (show other issues)
Version: 680m72
Hardware: All All
: P3 Normal (vote)
Target Milestone: AOO PleaseHelp
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 15:24 UTC by Stephan Bergmann
Modified: 2023-10-28 19:07 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2005-01-20 15:24:16 UTC
The HTTP UCP does not detect and reject URLs that contain unescaped NULL
(U+0000), LF (U+000A), and CR (U+000D).  When "http://host/path" is a working
URL, calling XContent.execute("getPropertyValues") to retrieve the "Size"
property on contents corresponding to the following URLs has the following
results (all string literals are in Java notation):

"http://host/path": success
"http://host/path\u0000foo": success (error: "\u0000foo" is silently dropped on
client side)
"http://host/path\r\nfoo": com.sun.star.ucb.InteractiveNetworkReadException ""
(error: garbage is sent from client to server)
Comment 1 kai.sommerfeld 2005-01-20 15:32:37 UTC
Auweia! :-)
Comment 2 kai.sommerfeld 2005-03-02 12:00:05 UTC
.
Comment 3 kai.sommerfeld 2005-12-19 14:59:55 UTC
Andreas, please take care.
Comment 4 kai.sommerfeld 2005-12-19 15:07:25 UTC
.
Comment 5 andreas.bille 2006-06-16 14:53:41 UTC
accepted
Comment 6 andreas.bille 2007-04-04 13:39:49 UTC
ABI->KSO: As discussed ...
Comment 7 kai.sommerfeld 2007-04-05 08:32:45 UTC
.
Comment 8 kai.sommerfeld 2007-08-15 12:38:26 UTC
KSO->TKR: Please take care of this issue.
Comment 9 tkr 2007-08-20 09:49:10 UTC
.
Comment 10 oooforum (fr) 2023-06-13 14:32:53 UTC
I bump this issue that still continue in 4.1.14
https protocol is not supported

Try this macro

sub main
    sPage = HttpGet("https://httpbin.org/ip")
    msgbox sPage
end sub

function HttpGet(url)
    sfa = createunoservice("com.sun.star.ucb.SimpleFileAccess")
    instream = sfa.openFileRead(url)
    txtinstream = createunoservice("com.sun.star.io.TextInputStream")
    txtinstream.setInputStream(instream)
    html = txtinstream.readString(array(), False)
    txtinstream.closeInput()
    HttpGet = html
end function

Don't work and results this error:
An exception occured
Type: com.sun.star.ucb.InteractiveNetworkReadException
Message: .
Comment 11 Czesław Wolański 2023-06-14 19:22:36 UTC
@oooforum (fr)
On Windows I get no error. Your macro returns


{
  "origin": "XXXX"
}


where XXXX stands for an IP address.
Comment 12 oooforum (fr) 2023-06-16 13:44:40 UTC
(In reply to Czesław Wolański from comment #11)
> On Windows I get no error. 
OK could you tell me Windows edition you have?
Comment 13 Czesław Wolański 2023-10-28 19:07:01 UTC
(In reply to oooforum (fr) from comment #12)
> OK could you tell me Windows edition you have?

Apologies for the delayed response.

Same result on Windows 7 and Windows 11 (10.0.22621)