Commit Graph

16 Commits

Author SHA1 Message Date
Stephan Bergmann
f0a9ca24fd rhbz#887420 Implement "block untrusted referer links" feature
For now, this checks for a trusted referer (if the BlockUntrustedRefererLinks
configuration prop is set) in utl::MediaDescriptor::impl_openStreamWithURL and
SvxBrushItem::GetGraphicObject.  Checking in additional places will probably be
necessary to block /all/ unwanted communication.  Also, some places marked
/*TODO?*/ currently pass in an empty referer (which is always considered
trusted) and will probably need to be adapted.

Ideally, Referer URIs would never be empty (and consistently use something like
<private:user> for cases where access is explicitly initiated by the user and
should never be blocked), but that's a very daunting task, so start small by
identifying the places that potentially need blocking and adding appropriate
Referer URIs there.  Also, Referer information should always be computed as
freshly as possible from the context in which an access attempt is made, but,
again, always carrying the information from the context all the way to the
relevant functions is a very daunting task, so for now store the information
upon object instantiation in some cases (SvxBrushItem, SdrGrafObj, ...).

The Referer URI (css.document.MediaDescriptor property; SID_REFERER) was already
used to track macro execution, and there is one place in
SfxApplication::OpenDocExec_Impl where opening of hyperlinks (explicitly clicked
by the user) is done that needs the current document's URI as Referer to check
execution of macro URIs but needs an empty (or <private:user>, see above)
Referer to not block non-macro URIs.  Special code has been added there to
handle that.

Change-Id: Iafbdc07a9fe925d9ee580d4f5778448f18f2ebd9
2013-11-14 11:13:25 +01:00
Stephan Bergmann
24cad6a649 Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.

Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14 11:13:24 +01:00
Noel Grandin
a5536d9a0e remove unnecessary use of OUString constructor in SW module
Change-Id: I015959dce567e5579ebb5c775fb57ae14e1cd3b1
2013-11-08 08:44:33 +02:00
Noel Grandin
9ad56bac45 convert sw/source/core/inc/r*.hxx from String to OUString
Change-Id: Ie2523eb8f7054d145ef969e65da1361134bfbb1e
2013-10-15 12:25:31 +02:00
Philipp Riemer
3a33d89c97 work on comments in sw/source/core/docnode/
Change-Id: Ie988076dc73f80fa962daa2e9d8e05132ed7180b
Reviewed-on: https://gerrit.libreoffice.org/5869
Reviewed-by: Philipp Riemer <ruderphilipp@gmail.com>
Tested-by: Philipp Riemer <ruderphilipp@gmail.com>
2013-09-07 22:25:08 +00:00
Philipp Riemer
a7c60c0e63 remove/add blank lines for consistent code layout in sw/source/core/docnode/
Change-Id: I4ccd099b8ae491c69f25fd32d12a532348d6655d
Reviewed-on: https://gerrit.libreoffice.org/5868
Reviewed-by: Philipp Riemer <ruderphilipp@gmail.com>
Tested-by: Philipp Riemer <ruderphilipp@gmail.com>
2013-09-07 22:21:40 +00:00
Krisztian Pinter
6f6443f2cb RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removals
Change-Id: I3ef372b07f2bacc2b9bbbb034e3d61b9cc8a3677
Reviewed-on: https://gerrit.libreoffice.org/2486
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-03-01 15:15:17 +00:00
Michael Meeks
caaeb0a046 re-base on ALv2 code. Includes:
Patches contributed by Oliver-Rainer Wittmann
    sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
    apply print settings to new printing routines
    http://svn.apache.org/viewvc?view=revision&revision=1172115
    sw34bf06: #o12311627# use <rtl_random> methods to
    create unique ids for list styles and list ids
    http://svn.apache.org/viewvc?view=revision&revision=1172112
    sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> -
    clear list structures completely
    http://svn.apache.org/viewvc?view=revision&revision=1172122
    i#118572 - remove ui string and help content regarding usage of
    Java Mail in Writer's Mail Merge as Java Mail is not used.
    http://svn.apache.org/viewvc?view=revision&revision=1197035

    Patches contributed by Mathias Bauer
    cws mba34issues01: #i117718#: provide filter name in
    case storage of medium does not allow to detect one
    http://svn.apache.org/viewvc?view=revision&revision=1172350
    cws mba34issues01: #i117721#: directly provide
    parameters retrieved from SfxMedium
    http://svn.apache.org/viewvc?view=revision&revision=1172353
    gnumake4 work variously
    http://svn.apache.org/viewvc?view=revision&revision=1394707
    http://svn.apache.org/viewvc?view=revision&revision=1394326
    http://svn.apache.org/viewvc?view=revision&revision=1396797
    http://svn.apache.org/viewvc?view=revision&revision=1397315
    cws mba34issues01: #i117723#: convert assertion into trace
    http://svn.apache.org/viewvc?view=revision&revision=1172355
    cws mba34issues01: #i117699#: keep layout alive until swdoc dies
    http://svn.apache.org/viewvc?view=revision&revision=1172362
    cws mba34issues01: #i117943#: missing color attributes in RTF clipboard
    http://svn.apache.org/viewvc?view=revision&revision=1172363

    Patch contributed by Henning Brinkmann
    imported patch i#103878
    http://svn.apache.org/viewvc?view=revision&revision=1172109

    Patches contributed by Michael Stahl
    sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes
    http://svn.apache.org/viewvc?view=revision&revision=1172119

    Patch contributed by imacat
    Fixed the Asian language work count.
    http://svn.apache.org/viewvc?view=revision&revision=1241345

    Patch contributed by Pedro Giffuni
    i#20878 - Add comment with BZ issue for reference.
    http://svn.apache.org/viewvc?view=revision&revision=1244517

    Patch contributed by Andre Fischer
    Do not add targets for junit tests when junit is disabled.
    http://svn.apache.org/viewvc?view=revision&revision=1241508

add writerperfect dependency.
2012-11-30 10:10:38 +00:00
Norbert Thiebaud
dff7e08711 remove include of pch header from sw 2011-11-27 13:25:10 -06:00
shirahara
b7e0292a62 Remove comments (writer) 2011-02-03 09:26:50 +01:00
Caolán McNamara
5bd9278771 micro optimizations 2010-10-27 16:05:02 +01:00
Sebastian Spaeth
61355e51b8 Add vim/emacs modelines to all source files
Fixes #fdo30794 Based on bin/add-modelines script (originally posted
in mail 1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-14 17:16:56 +02:00
Petr Mladek
a4781ea4a1 remove include guards using fixguard.py 2010-10-05 18:22:24 +02:00
Jens-Heiner Rechtien
1a359bd2a8 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm
f708ae37d3 INTEGRATION: CWS changefileheader (1.2.342); FILE MERGED
2008/04/01 15:57:01 thb 1.2.342.3: #i85898# Stripping all external header guards
2008/04/01 12:54:01 thb 1.2.342.2: #i85898# Stripping all external header guards
2008/03/31 16:53:51 rt 1.2.342.1: #i87441# Change license header to LPGL v3.
2008-04-10 12:35:14 +00:00
Oliver Bolte
336037c403 INTEGRATION: CWS swqbf91 (1.1.2); FILE ADDED
2007/06/20 12:18:29 od 1.1.2.10: #i73788# further step to final implementation
2007/06/07 19:48:29 od 1.1.2.9: #i73788## further steps to the final implementation
2007/05/03 15:33:00 od 1.1.2.8: #i73788# further refactoring of non-blocking load of linked graphics
2007/04/13 10:15:47 od 1.1.2.7: #i73788# - further refactoring
2007/04/13 08:53:44 od 1.1.2.6: #i73788# - adjusting documentation
2007/03/30 11:29:28 od 1.1.2.5: #i73788# - redesign of non-blocking load of linked graphics
2007/03/15 11:40:43 od 1.1.2.4: #i73788# further adjustments to the implementation
2007/03/14 13:22:15 od 1.1.2.3: #i73788# further adjustments to the implementation
2007/03/09 08:52:53 od 1.1.2.2: #i73788# - fix potential deadlock
2007/01/30 15:04:03 od 1.1.2.1: #i73788# - implementation of new class <SwAsyncRetrieveInputStreamThread>
2007-07-18 12:31:42 +00:00