Issue 123744 - Pictures in pasted WEB-site contents: only placeholders shown
Summary: Pictures in pasted WEB-site contents: only placeholders shown
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 4.0.0
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL: https://www.facebook.com/
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-11-24 18:56 UTC by Rainer Bielefeld
Modified: 2017-05-20 10:35 UTC (History)
5 users (show)

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


Attachments
Sample Document (15.83 KB, application/3dr)
2014-01-20 14:18 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2013-11-24 18:56:04 UTC
Steps how to reproduce Reproducible with "AOO 4.0.1   – German UI / German locale  [Rev. 1524958 2013-09-20 11:40:29]" on  German WIN7 Home Premium (64bit)", “historic”  4.0  User Profile used for all  predecessor versions:

0. From AOO Start center open new HTML document
1. open <https://www.facebook.com/khessia.famor.96/friends>
   (does not matter, same for other similar pages, you might need 
   Facebook account)
2. Select  from "All Friends" first eight friends
3. <control+c> for Copy
4. Click into new HTML document
5. <control+v> for paste
   As expected contents becomes pasted
   Bug: Pictures stay as placeholders, no pictures will appear    :-(

Additional info:
(a) Works fine with LibO 4.2
(b) with menu 'tools -> Options -> OO -> General - Update links
    = "Ask": does not ask
(c) All the same with normal Writer documents
(d) worked fine with server installation of  "AOO 3.4.0 – German UI / 
    German locale [AOO340m1(Build:9590) - Rev.1327774]" on 
    German WIN7 Home Premium (64bit)", own separate user profile
(e) if necessary I will narrow down appearance of problem.
(f) not a general problem, I tried Wikipedia main page, pictures will be shown
(g) but also other Facebook pictures, for example on same page 9 Thumbnail 
    photos show the same problem.
Comment 1 Oliver-Rainer Wittmann 2014-01-20 11:44:44 UTC
As I have no facebook account I am not able to reproduce the described defect.

Rainer:
Can you save the created HTML document and attach it? The corresponding link information should survive the saving process.
Thx in advance.
Comment 2 Rainer Bielefeld 2014-01-20 14:18:16 UTC
Created attachment 82321 [details]
Sample Document

> Can you save the created HTML document and attach it?

@Oliver:
Problem is not reproducible with saved HTML page, but I think I found an
other way how to reproduce the problem with the document I created doing steps 1-5 of my original report:

11. Open attached "thisworksnot.odt" From AOO4.0.1 Start Center
   Bug: Instead of pictures only placeholders will be shown.           :-(
12. Close document without changing changes
13. Open attached "thisworksnot.odt" From AOO3.4.0 Start Center
   As expected after few moments thumbnail pictures will appear        :-(

I am pretty sure the problem in step 13 is the same as in step 5 of original report.
Comment 3 Oliver-Rainer Wittmann 2014-01-21 08:27:51 UTC
Thx for sample document - I am taking over to have a deeper look.
Comment 4 Oliver-Rainer Wittmann 2014-01-21 09:03:42 UTC
(In reply to Rainer Bielefeld from comment #2)
> Created attachment 82321 [details]
> Sample Document
> 
> [snip] 
> 
> 11. Open attached "thisworksnot.odt" From AOO4.0.1 Start Center
>    Bug: Instead of pictures only placeholders will be shown.           :-(
> 12. Close document without changing changes
> 13. Open attached "thisworksnot.odt" From AOO3.4.0 Start Center
>    As expected after few moments thumbnail pictures will appear        :-(
> 
> I am pretty sure the problem in step 13 is the same as in step 5 of original
> report.

I can confirm this defect. I will take these reproduction steps to work further on this issue.

I reproduced the defect also in AOO 4.0.0 --> adjusting fields "Version" and "L.C. on"

Some further investigations:
I switched to the OpenOffice Open-File-/Save-File-dialogs.
When I open the URL of the first image directly in the Open-File dialog in AOO 3.4.1 I got a warning dialog regarding a certification mismatch (I am not sure, if this is a false-positive as Firefox is fine with the certification). Continuing the process opens the image in Draw. Cancelling the process nevertheless opens the image in Draw. This is a defect in AOO 3.4.1 from my point of view.
Doing the same in AOO 4.0.0, AOO 4.0.1 or my current trunk build shows the same certification mismatch dialog. 'Continuing' opens the image in Draw. 'Cancelling' does not open the image and provides error message 'Error reading data from Internet. Server error message.'
My first assumption is that we had fixed the above observed defect for AOO 4.0.0 and thus, such linked images are no longer loaded.

Now, I will have some debugging sessions to find the root cause and hopefully an acceptable fix.
Comment 5 Oliver-Rainer Wittmann 2014-01-21 11:29:57 UTC
The certification mismatch warning is a not correct.

The certification alternative names for valid domains is not correctly read - see method <handleCertificateValidationRequest_(..)>. The first entry in the alternative names is not considered.
For the URL of the first image this alternative name is the needed wildcard one to match the domain of the image's name.
Comment 6 Oliver-Rainer Wittmann 2014-01-21 13:37:13 UTC
The wrong certificate mismatch warning is only one part of the root cause for this issue. Corresponding debugging sessions on current trunk and AOO 3.4.1 code line reveals that together with our update to serf 1.1.0 the defect is triggered. 

From observing the serf API calls and its results it reveals that since version 1.1.0 serf got it right regarding certificate validations. AOO 3.4.1 using serf 1.0.0 got the data stream of the linked images in spite of the the fact that the certificate was not validated automatically or manually. This is no longer the case in current trunk (which already uses serf 1.2.0, AOO 4.0.x are on serf 1.1.0).
Comment 7 Oliver-Rainer Wittmann 2014-01-21 15:13:21 UTC
Further investigation reveals that in the non-interactive case (e.g. loading of linked images in the background - as for the sample document or the original described copy-and-paste from a browser), the alternative domain names of the given certificate are not considered.

Now, (as I hope) I have all pieces together to provide a fix for this issue.
Comment 8 SVN Robot 2014-01-21 16:17:40 UTC
"orw" committed SVN revision 1560062 into trunk:
123744: method <handleCertificateValidationRequest_(..)> - correct considerat...
Comment 9 SVN Robot 2014-01-21 16:36:09 UTC
"orw" committed SVN revision 1560071 into trunk:
123744: method <SerfSession::verifySerfCertificateChain(..)> - consider certi...
Comment 10 Oliver-Rainer Wittmann 2014-01-21 16:39:22 UTC
fixed in trunk for next release.

@Rainer: 
Could you verify that the original reported defect is also fixed.
Once a buildbot build containing my fix is available you could have a look.
Thx in advance.
Comment 11 Yuri Dario 2014-02-15 12:05:43 UTC
Shouldn't SerfTypes.hxx changes done in revision 1560071 also be applied to other headers and sources in same dir?
Comment 12 Oliver-Rainer Wittmann 2014-02-17 10:21:20 UTC
(In reply to Yuri Dario from comment #11)
> Shouldn't SerfTypes.hxx changes done in revision 1560071 also be applied to
> other headers and sources in same dir?

Yes, such changes could be made to the other includes as well.
There are not necessary, as we add the corresponding folders (.../apr/, .../apr-util/ and .../serf/) to the include path.
Comment 13 Yuri Dario 2014-02-17 10:33:19 UTC
I'm building with the system serf, so headers cannot be in two different directories. 
So if path is /usr/include, <serf/serf.h> is correct but <serf.h> fails. The other way if include path is /usr/include/serf.
Comment 14 Oliver-Rainer Wittmann 2014-02-17 11:40:01 UTC
(In reply to Yuri Dario from comment #13)
> I'm building with the system serf, so headers cannot be in two different
> directories. 
> So if path is /usr/include, <serf/serf.h> is correct but <serf.h> fails. The
> other way if include path is /usr/include/serf.

I am sorry that I was not clear:
.../apr/, .../apr-util/ and .../serf/ are added to the include path in case the system apr|apr-util|serf is _NOT_ used.

Thus, go ahead to change the includes as for the case that the non-system ones are used it should not matter, if <serf/serf.h> or <serf.h> is included.
Comment 15 SVN Robot 2014-02-17 16:32:25 UTC
"ydario" committed SVN revision 1569046 into trunk:
#i123744# use only one way to include serf headers.
Comment 16 Yuri Dario 2014-02-28 16:23:41 UTC
I looked again at the header path issue for serf and apr. System headers on my linux system are in

/usr/include/serf-1
/usr/include/apr-1.0

these paths are defined in APR_CFLAGS and SERF_CFLAGS by set_soenv.inv when system libs are in use, thus using <serf/serf.h> or <apr-util/apr_uri.h> should be breaking the build on unix systems. I wrote 'should' because I'm on OS/2 where my setup is similar (and I can't do a linux build).

I propose to revert headers to old coding, without the directory name.
Comment 17 zhaoshzh 2014-04-01 07:09:00 UTC
(In reply to Rainer Bielefeld from comment #2)
> Created attachment 82321 [details]
> Sample Document
> 
> > Can you save the created HTML document and attach it?
> 
> @Oliver:
> Problem is not reproducible with saved HTML page, but I think I found an
> other way how to reproduce the problem with the document I created doing
> steps 1-5 of my original report:
> 
> 11. Open attached "thisworksnot.odt" From AOO4.0.1 Start Center
>    Bug: Instead of pictures only placeholders will be shown.           :-(
> 12. Close document without changing changes
> 13. Open attached "thisworksnot.odt" From AOO3.4.0 Start Center
>    As expected after few moments thumbnail pictures will appear        :-(
> 
> I am pretty sure the problem in step 13 is the same as in step 5 of original
> report.

the 11 issue still exists on   Rev. 1573601
Comment 18 mroe 2014-04-01 07:28:47 UTC
(In reply to zhaoshzh from comment #17)
> > 11. Open attached "thisworksnot.odt" From AOO4.0.1 Start Center
> >    Bug: Instead of pictures only placeholders will be shown.           :-(

> the 11 issue still exists on   Rev. 1573601

I use the same revision under Linux/Ubuntu. Can't reproduce the problem. Only with 4.0.1 Rev. 1524958.
I can remember a similar but solved bug with https in OOo <3.3.