Re: [xwiki-users] Small attachments in DB, big ones in files?

2017-02-11 Thread Lilianne E. Blaze
Hello,
Yes, I read the documentation, that wasn't what I was asking.
So, is it impossible? I can't be the first person that could use
something like that.

Greetings, L

On 2/10/2017 9:12 PM, Mohamed Boussaa wrote:
> Hello,
> 
> XWiki offers the possibility to store your attachments in the database or
> directly in the file system.
> 
> See more details in this link:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HAttachmentStorage
> 
> Regards,
> Mohamed
> 
> On Fri, Feb 10, 2017 at 8:34 PM, Lilianne E. Blaze <
> lilia...@lilianne-blaze.net> wrote:
> 
>> Hello,
>> Is it possible to store attachments below a certain size inside a
>> database, while storing bigger ones in files?
>>
>> I assume when using HSQL database it is usually preferred to store
>> attachments in files?
>>
>> Greetings, Lilianne
>>
> 



[xwiki-users] Small attachments in DB, big ones in files?

2017-02-10 Thread Lilianne E. Blaze
Hello,
Is it possible to store attachments below a certain size inside a
database, while storing bigger ones in files?

I assume when using HSQL database it is usually preferred to store
attachments in files?

Greetings, Lilianne


[xwiki-users] Mail Auth patch for 1.8

2009-04-01 Thread Lilianne E. Blaze
Hello,
Here's the newest version.

Basically it bridges XWiki.sendMessage to MailSenderPlugin.

It uses Reflection, so no circulars, but it's not exactly pretty.

Why it's needed - registration / validation / activation e-mails are
still sent via obsolete Apache Commons SmtpClient, so they _do not_
support SMTP AUTH.

This is a _major_ problem because due to spam and other abuse less and
less hosting providers / network admins allow SMTP without
authorization, and those who do are likely to have very insecure
infrastructure.

I honestly believe this is a MUST HAVE for a secure, spam-free
configuration.

Greetings, Lilianne
Index: main/resources/XWiki/AdminGeneralSheet.xml
===
--- main/resources/XWiki/AdminGeneralSheet.xml  (revision 18064)
+++ main/resources/XWiki/AdminGeneralSheet.xml  (working copy)
@@ -61,6 +61,6 @@
 #set($params.language = ['multilingual', 'languages' , 'default_language', 
'dateformat'])
 #set($params.editor = ['editor'])
 #set($params.admin = ['admin_email'])
-#set($params.server = ['smtp_server'])
+#set($params.server = ['smtp_server', 'smtp_server_username', 
'smtp_server_password', 'javamail_extra_props'])
 #includeForm('XWiki.AdminFieldsDisplaySheet')/content
 /xwikidoc
Index: main/java/com/xpn/xwiki/XWiki.java
===
--- main/java/com/xpn/xwiki/XWiki.java  (revision 17953)
+++ main/java/com/xpn/xwiki/XWiki.java  (working copy)
@@ -161,6 +161,8 @@
 import com.xpn.xwiki.web.XWikiURLFactoryService;
 import com.xpn.xwiki.web.XWikiURLFactoryServiceImpl;
 import com.xpn.xwiki.web.includeservletasstring.IncludeServletAsString;
+import java.io.BufferedReader;
+import java.io.StringReader;
 
 public class XWiki implements XWikiDocChangeNotificationInterface
 {
@@ -2838,9 +2840,13 @@
 needsUpdate |= bclass.addTextAreaField(meta, HTTP Meta Info, 60, 
8);
 needsUpdate |= bclass.addTextField(dateformat, Date Format, 30);
 
+// mail
 needsUpdate |= bclass.addBooleanField(use_email_verification, Use 
eMail Verification, yesno);
+needsUpdate |= bclass.addTextField(admin_email, Admin eMail, 30);
 needsUpdate |= bclass.addTextField(smtp_server, SMTP Server, 30);
-needsUpdate |= bclass.addTextField(admin_email, Admin eMail, 30);
+needsUpdate |= bclass.addTextField(smtp_server_username, SMTP 
Server username (optional), 30);
+needsUpdate |= bclass.addTextField(smtp_server_password, SMTP 
Server password (optional), 30);
+needsUpdate |= bclass.addTextAreaField(javamail_extra_props, 
Additional JavaMail properties, 60, 6);
 needsUpdate |= bclass.addTextAreaField(validation_email_content, 
Validation eMail Content, 72, 10);
 needsUpdate |= bclass.addTextAreaField(confirmation_email_content, 
Confirmation eMail Content, 72, 10);
 needsUpdate |= bclass.addTextAreaField(invitation_email_content, 
Invitation eMail Content, 72, 10);
@@ -3311,9 +3317,139 @@
  * Plugin/a
  */
 @Deprecated
-public void sendMessage(String sender, String[] recipient, String message, 
XWikiContext context)
+public void sendMessage(String sender, String[] recipients, String 
message, XWikiContext context)
 throws XWikiException
 {
+LOG.info(Entering sendMessage(...)...);
+
+Object mailSender;
+Class mailSenderClass;
+Method mailSenderSendText;
+
+try
+{
+mailSender = getPluginApi(mailsender, context);
+mailSenderClass = 
Class.forName(com.xpn.xwiki.plugin.mailsender.MailSenderPluginApi);
+
+// public int sendTextMessage(String from, String to, String 
subject, String message)
+mailSenderSendText = mailSenderClass.getMethod(sendTextMessage,
+new Class[]{String.class, String.class, String.class, 
String.class});
+}
+catch(Exception e)
+{
+String eMsg = Problem getting MailSender via Reflection:  + e;
+LOG.error(eMsg);
+throw new XWikiException(XWikiException.MODULE_XWIKI_EMAIL,
+XWikiException.ERROR_XWIKI_EMAIL_ERROR_SENDING_EMAIL, 
eMsg);
+}
+
+LOG.trace(Message = \ + message + \);
+
+String messageParsed[] = parseRawMessage(message);
+String messageSubject = messageParsed[0];
+String messageBody = messageParsed[1];
+String messageRecipients = recipients[0];
+for( int i = 1; i  recipients.length; i++)
+{
+  messageRecipients = messageRecipients + , + recipients[i];
+}
+
+if( messageSubject == null )
+{
+  // TODO: provide some sensible default
+  messageSubject = Message from XWiki;
+}
+
+LOG.trace(Subject = \ + messageParsed[0] + \);
+LOG.trace(Text = \ + messageParsed[1] + \);
+
+try
+{
+  

Re: [xwiki-users] SMTP authentications

2009-03-10 Thread Lilianne E. Blaze
Norguir Bellagio wrote:
 Hi,
 
 I have crawled the mailing lists and support forums on this but I am 
 unable to figure out the answer.
 
 I am evaluating Xwiki and love Workspaces from what I've seen so far. 
 The one thing that really bogs me down is the inability to register an 
 authenticated SMTP server. I have read there is a patch from Liliane, 
 and the feature is included on 1.6 but I just can't seem to understand 
 how to get is to work. In an evaluation perspective (and very much so as 
 well in production), not being able to use authenticated SMTP server is 
 a no go for me.
 Could you please point me to a resource that clarifies what the 
 situation is and possibly, the steps to enable it on 1.7.
 
 Thanks !
 
 norguir


Actually I'm still waiting for it :/

I just made a quick check and it looks like that patch was not
committed, there's no support for setting username and password in
Administration, and registration mails still go via deprecated
XWiki.sendMessage, which is using Apache Commons SMTPClient (made
obsolete by JavaMail ages ago) and has no support for username/password
and extra properties.

As for mail.smtp.starttls.enable=true, AFAIK when used alone it simply
does not make sense.

_Please_ do something about it :/

If I remember correctly last time the main issue was that the code had
to be integrated in core instead of mail plugin, please, can't we have
the thing working at all first, worry about module separation later?
Basic mail support _is_ core functionality. For me it's a showstopper,
and I don't have enough time to maintain a private fork, either smtp
auth goes in, or I'm going out :/

And before someone says it's open source and I should stop bitching and
submit a patch - I _did_ submit a patch months ago :/

Greetings, Lilianne


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Preventing History access for 'regular' users?

2008-06-18 Thread Lilianne E. Blaze
Vincent Massol wrote:
 On Jun 18, 2008, at 3:03 PM, Lilianne E. Blaze wrote:
 
 Vincent Massol wrote:
 Hi Lilianne,

 On Jun 18, 2008, at 4:04 AM, Lilianne E. Blaze wrote:

 Hello,
 Is there a way to restrict access to past versions only to Admin  
 and/
 or
 a selected power users group?
 I don't think this is possible out of the box. It also goes against
 the wiki principle of openness.
 Well, yes and no.

 It does go against traditional wiki ideas, but it could be useful in
 Wiki-as-CMS scenario.
 
 Yes, I agree.
 
 Is the solution I gave good enough for you for now? I don't see any  

Yes I think. It's more of a suggestion than a need on my part.

 easy and generic way of adding this to the core. Creating a new  
 History Right would be too complicated for this right now. I think  
 we need to overhaul our rights system so that it can scale and then we  
 should probably add more rights (same as what JIRA is doing for issues  

Will there be an option to make custom rights?

 for example - It has 20 or so rights). Or course it makes xwiki more  
 complex to use too.
 
 Thanks
 -Vincent
 


Greetings, Lilianne


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Preventing History access for 'regular' users?

2008-06-17 Thread Lilianne E. Blaze
Hello,
Is there a way to restrict access to past versions only to Admin and/or 
a selected power users group?

Greetings, Lilianne


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Forgetting past versions?

2008-06-17 Thread Lilianne E. Blaze
Hello,
Is it possible to periodically 'forget' versions older than x days?

Greetings, Lilianne E. Blaze


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Mail; Turing

2008-06-05 Thread Lilianne E. Blaze
Hello,
1) What's the status of change from Apache Commons Net Mail to JavaMail? 
It seems MailSenderPlugin.java is more or less ready but XWiki.java 
still uses the old code?

2) Are there any plans to allow for SMTP Authentication?

3) Is there a way to enforce some kind of turing test on register?

Greetings, Lilianne E. Blaze


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users