You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Jürgen Weber (JIRA)" <ji...@apache.org> on 2009/12/08 14:55:18 UTC

[jira] Created: (JSPWIKI-618) Allow Administrators to override attachment.maxsize

Allow Administrators to override attachment.maxsize
---------------------------------------------------

                 Key: JSPWIKI-618
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-618
             Project: JSPWiki
          Issue Type: Improvement
          Components: Core & storage
            Reporter: Jürgen Weber


I think limiting attachment sizes is a good thing. 
But Administrators should be able to override it, i.e. be able to upload bigger attachments than attachment.maxsize.

Workaround: temporarily remove attachment.maxsize

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


RE: [jira] Created: (JSPWIKI-618) Allow Administrators to override attachment.maxsize

Posted by "Dalen, Andre van" <an...@siemens.com>.
This might work counterproductive: Once users find out this can be overruled, 
the maximum setting will have lost its enforcing power and they will try to find
to get out of the limit themselves. (Possible by harrasing the admin until she
uploads the offending attachments.)

-----Original Message-----
From: Jürgen Weber (JIRA) [mailto:jira@apache.org] 
Sent: dinsdag 8 december 2009 14:55
To: jspwiki-dev@incubator.apache.org
Subject: [jira] Created: (JSPWIKI-618) Allow Administrators to override attachment.maxsize

Allow Administrators to override attachment.maxsize
---------------------------------------------------

                 Key: JSPWIKI-618
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-618
             Project: JSPWiki
          Issue Type: Improvement
          Components: Core & storage
            Reporter: Jürgen Weber


I think limiting attachment sizes is a good thing. 
But Administrators should be able to override it, i.e. be able to upload bigger attachments than attachment.maxsize.

Workaround: temporarily remove attachment.maxsize

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JSPWIKI-618) Allow Administrators to override attachment.maxsize

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harry Metske resolved JSPWIKI-618.
----------------------------------

    Resolution: Fixed

Fixed in 2.8.4-svn-5 and 3.0.0-svn-192

> Allow Administrators to override attachment.maxsize
> ---------------------------------------------------
>
>                 Key: JSPWIKI-618
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-618
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.8.3, 2.8.4, 3.0
>            Reporter: Jürgen Weber
>            Assignee: Harry Metske
>            Priority: Minor
>             Fix For: 2.8.4, 3.0
>
>
> I think limiting attachment sizes is a good thing. 
> But Administrators should be able to override it, i.e. be able to upload bigger attachments than attachment.maxsize.
> Workaround: temporarily remove attachment.maxsize

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JSPWIKI-618) Allow Administrators to override attachment.maxsize

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harry Metske updated JSPWIKI-618:
---------------------------------

             Priority: Minor  (was: Major)
    Affects Version/s: 3.0
                       2.8.4
                       2.8.3
        Fix Version/s: 3.0
                       2.8.4
             Assignee: Harry Metske
           Issue Type: Bug  (was: Improvement)

The funny thing is that there was already an attempt in the code to make this happen :

{code:java}

        if( !context.hasAdminPermissions() )
        {
            if( contentLength > m_maxSize )
            {
                // FIXME: Does not delete the received files.
                throw new RedirectException( "File exceeds maximum size ("+m_maxSize+" bytes)",
                                             errorPage );
            }

            if( !isTypeAllowed(filename) )
            {
                throw new RedirectException( "Files of this type may not be uploaded to this wiki",
                                             errorPage );
            }
        }

{code}

Unfortunately a few lines from there we do an unconditional ServletFileUpload.setFileSizeMax( m_maxSize ) which kills the whole story.
I'll fix this.

> Allow Administrators to override attachment.maxsize
> ---------------------------------------------------
>
>                 Key: JSPWIKI-618
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-618
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.8.3, 2.8.4, 3.0
>            Reporter: Jürgen Weber
>            Assignee: Harry Metske
>            Priority: Minor
>             Fix For: 2.8.4, 3.0
>
>
> I think limiting attachment sizes is a good thing. 
> But Administrators should be able to override it, i.e. be able to upload bigger attachments than attachment.maxsize.
> Workaround: temporarily remove attachment.maxsize

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.