SPIP commits

Subscribe to RSS feed

Posts tagged with "2.0"

Security vulnerabilities found in SPIP version 1.9.2, SPIP 2.0 and SPIP 2.1

, , , ...

Hello,

The flaw on the version 1.9.2 is major (sql injection) and if you have a version 1.9.2 to SPIP, we strongly recommend to update to the version 1.9.2.k.

On versions 2.0 and 2.1, the impact on the site is less important (full path disclosure), but we recommend to update in 2.0.16 and 2.1.11.

In any case you always have the opportunity to protect rapidly your site (until its complete updated) by downloading the security screen version 1.0.5 (July 26, 2011), and dropping it in your config directory (see http://www.spip.net/en_article4201.html).

Feel free to use the various resources available to the community (http://boussole.spip.org) for assistance during this updated, in particular:
- Spip-user list http://listes.rezo.net/mailman/listinfo/spip
- English Spip-user list http://listes.rezo.net/mailman/listinfo/spip-en
- Forum http://forum.spip.org/
- IRC http://spip.net/irc


Warning:
-----------------------

Note that when the version 3.0 will be released, the support for the branch 1.9.2 will be abandoned.


How to update?
-----------------------

1. spip_loader.php:
If you have already installed spip_loader, go to the address
http://YOUR_SITE_URL/spip_loader.php to install SPIP 2.1.11

2. by copying the files:
SPIP 2.1.11 is available at http://files.spip.org/spip/stable/spip.zip
SPIP 2.0.16 is available at http://files.spip.org/spip/archives/SPIP-v2-0-16.zip
SPIP 1.9.2k is available at http://files.spip.org/spip/archives/SPIP-v1-9-2k.zip

3. SVN:
If you are in the 2.1 branch just do a
svn up svn://trac.rezo.net/spip/branches/spip-2.1
the version 2.1.11 is also available in the industry:
svn://trac.rezo.net/spip/branches/spip-2-stable/
and under the tag
svn://trac.rezo.net/spip/tags/spip-2.1.11/

Post Scriptum:
-----------------------

We remind everyone that the best way to report faults or suspected faults is to send an email to spip-team@rezo.net. This is what did Lawrence Esthieux (TEHTRI-Security) and we thank him.

source: http://www.spip-contrib.net


! Important security patch for SPIP : please upgrade your version or install the security screen

, , ,

Hello,

the SPIP team (thank you again Arnault) have discovered a security hole in SPIP, allowing an injection of cross-site-scripting (XSS).

The error dating back more than five years (it was introduced October 8, 2005), it is clear that ALL versions of SPIP are affected.

To secure your site, simply update the file 404.html (and for some templates 401.html), located in the directory:
dist/ in SPIP version 1.9
squelettes-dist/ in SPIP version 2.0 or 2.1
extensions/dist_2007/ in the dev version
and also in your templates (ex. zpip)

If you have customized this template, the fix is simply to remove star and filter to transform the expression
#ENV*{erreur}|propre
into #ENV{erreur}.

We remind everyone that the best way to inform us of vulnerabilities is to send an email to spip-team@rezo.net.

Feel free to use the following means available to get help with this migration:
spip-user list: http://listes.rezo.net/mailman/listinfo/spip
The english list: http://listes.rezo.net/mailman/listinfo/spip-en
Forum: http://forum.spip.org/
irc: http://spip.net/irc


How to upgrade?

As usual, several possibilities for the update:

1. security screen: if you do not have time to do it now a full update, you can secure your site in two minutes by downloading the 1.0.1 version of the security screen, and copy it in config/
cf. http://www.spip.net/en_article4201.html

2. by spip_loader.php: If you installed spip_loader, go to the address http://YOUR_WEBSITE_URL/spip_loader.php to install SPIP 2.1.9

3. FTP: SPIP 2.1.9 is available at http://files.spip.org/spip/stable/

4. and of course by SVN, just do svn up

in the 2.1 branch: svn://trac.rezo.net/spip/branches/spip-2.1
in the stable branch: svn://trac.rezo.net/spip/branches/spip-2-stable/
on the tag: svn://trac.rezo.net/spip/tags/spip-2.1.9/

For older versions, we did a zip for 1.9.2j and 2.0.14 that can be found on http://files.spip.org/spip/archives/


-- news freely translated from the official announcement --

LOGO_DOCUMENT : How to use it with SPIP 2.1

, , , ...

Changes beetween 2.0 and 2.1
until SPIP 2.0 in SPIP 2.1 and after
[(#LOGO_DOCUMENT|#URL_DOCUMENT)]
[(#LOGO_DOCUMENT|fichier)]
[(#LOGO_DOCUMENT|lien)]
[(#LOGO_DOCUMENT|left)]
[(#LOGO_DOCUMENT||image_reduire{80,60})]
[(#LOGO_RUBRIQUE||texte_script)]
[(#LOGO_DOCUMENT|left|image_reduire{80,60})]
[(#LOGO_DOCUMENT{80,60}|left)]
#LOGO_DOCUMENT{#URL_DOCUMENT}
#LOGO_DOCUMENT**
#LOGO_DOCUMENT*
#LOGO_DOCUMENT{left}
#LOGO_DOCUMENT{80,60}
#LOGO_RUBRIQUE{texte_script}
#LOGO_DOCUMENT{left,80,60}
#LOGO_DOCUMENT{80,60,left}
  • #LOGO_DOCUMENT** : The picture file name (ex. doc123.jpg)
  • #LOGO_DOCUMENT* : The relative url of the picture file name (ex. IMG/doc123.jpg)
  • #LOGO_DOCUMENT{left} : 'left' isn't a standard filter. It only modifies the position of the logo in the generated HTML code. It can be either 'left', 'right', 'top', 'bottom'. They can combine together (for ex. #LOGO_DOCUMENT{top,left})
  • #LOGO_RUBRIQUE{texte_script} : with this new form, double-pipes are not necessary for a standard filter
  • #LOGO_DOCUMENT{left,80,60,text_script} : arguments can be combined, the order doesn't matter. With one exception : the first number is the width of the generated picture, the second number is it's height. Of course, if there is only one number, this follow the comportement of 'image_reduire' : the height and width of the picture are both less than this number.

[13993] several arguments in #INCLURE or #MODELE

, , ,

#INCLURE and #MODELE accept several parameters : the syntax used for it was #INCLURE(a){b}{c}. This syntax has been introduced in spip1.9.1. We can also read on the official documentation :


Models are not restricted to shortcuts within the text of articles. They can also be called from within a template by using the tag #MODELE{model} or [(#MODELE{model}{p1=thing,p2=whatsit}{p3=etc}|filter...)]. But this is less new, because it is equivalent to a (static) inclusion of another template (already made possible by the tag #INCLURE).

However it was quite buggy and not really homogeneous. For ex. a few abnormal differences were found between #MODELE{my_model, ..} and #INCLURE(fond=modeles/my_model){..}. Now, the codes with parenteses and/or several braces delimited blocks are considered as deprecated : You should write instead #INCLURE{a,b,c} and #MODELE{a,b,c}. The old syntax is still accepted. Ex.:
#INCLURE(fond=inc-header){type=test}{env}
#INCURE{fond=inc-header, type=test, env}
#MODELE{img,lien=article5,class=logo,align=left,lien_class=important}
You can also calculate these parameters with other static content (like tags, #MODELE and #INCLURE) :
#INCLURE{fond=inc-[(#ENV{skel}|secu)]}
#MODELE{img,lien=article5,class=logo_#LANG_LEFT,align=#LANG_LEFT}
Parentheses, brakets and filters can also be used to display elements only where #INCLURE returns a content : Ex. :
[Lastest articles in the feed #FEED_TITLE : 
  <ul>
  (#INCLURE{fond=rss-read, url=#FEED_URL, date=#DATE}|extract_post_titles)
  </ul>
]
Edit : The first argument of an INCLURE can be calculated. The common syntax indicates that filters require parentheses. But, for reason of compatibility, the following simplified syntax is accepted :
[(#INCLURE{#CHEMIN{spip_style.css}|url_absolue_css}|compacte_css)]

Read more...

Creating custom tags for SPIP

, , , ...

On its blog, Thomas Sutton describes how to create your own static SPIP tags.

The SPIP template language has two constructions: loops (which determine the objects to be “output”) and tags (which actually output particular values). The reasonably simple syntax of tags — most look like ”#THE_TAG” — belies their power and flexibility and the ease with which we can use them to extend SPIP with additional features and integrate it with other PHP-based packages.

It's post is really well documented. I love the way Thomas precisely explains how all this stuff really works !

So I advise you to read the complete post on it's website : http://passingcuriosity.com.

The latest filters and pipelines for programmers

, , , ...

The SPIP team is really active and improve it regularly.
Here is a list of new functions that can help you develop plugins :

supprimer_objets_lies ( array($type, $id) ) :
Type : pipeline
Removes the objects of plugins linked to core objects (used when these core objects are deleted)

// http://doc.spip.org/@action_editer_message_post_supprimer
function action_editer_message_post_supprimer($id_message) {
        sql_delete("spip_messages", "id_message=".sql_quote($id_message));
        sql_delete("spip_auteurs_messages", "id_message=".sql_quote($id_message));
        pipeline('supprimer_objets_lies',array(
                array('type'=>'message','id'=>$id_message)
        ));
}


optimiser_sansref ($table, $id, $sel) :
This pipeline is called in genie/optimiser.php
It completes the removal process of orphelin objects.
(dead links between tables, that results from the suppression of articles, authors, etc)

example :
/**
 * Optimizes the database by removing orphelins forums
 *
 * @param int $n
 * @return int
 */
function forum_optimiser_base_disparus ($n){
       # detect forums that are linked to an id_rubrique that doesn't exist anymore
       $res = sql_select("forum.id_forum AS id",
                       "spip_forum AS forum
                       LEFT JOIN spip_rubriques AS rubriques
                         ON forum.id_rubrique=rubriques.id_rubrique",
                       "rubriques.id_rubrique IS NULL
                        AND forum.id_rubrique>0");

       $n+= optimiser_sansref ('spip_forum', 'id_forum', $res);
       
...
       
       return $n;
}



filtre_lien_ou_expose ($url, $text, $on=false, $class="", $title="", $rel="") :
This filter creates a link or a tag <strong class='on'>
note : class, title and rel are optional
usage ; [(#URL|lien_ou_expose{texte,condition_selection_on,class,title,rel})]
example : [(#GET{self}|parametre_url{type,public}|lien_ou_expose{<:onglet_messages_publics:>,#ENV{type,public}|=={public}})]


filtre_balise_img ($img, $alt="", $class="") :
This filter creates an <img> tag
usage : [(#CHEMIN{monimage.png}|balise_img)]
(the opposite of filtre_fichier())


filtre_icone ($link, $text, $template_name, $align="", $function="", $class="") :
This filter is a shortcut for creating icons in the templates of the private area
usage : [(#URL|icone{text,template_name,align,function,class})]

test_plugin_actif ('prefix_of_the_plugin') :
This function tests if a plugin is activated and returns a boolean.

Top 20 most used SPIP plugins (and a few more)

, , ,

This is not a fresh news, but I've just read a mail that Pat sent on SPIP-ZONE.

It give the complete records of the most used plugins, at the begining of October.
It have been calculated with the websites declared on spip.net and some other sites.

Thanks Pat for your job !

So, ladies and gentlemen, the top 20 most used plugins are :
- cfg (821)
- thickbox1 (735)
- couteau_suisse (731)
- barretypoenrichie (633)
- forms (624)
- spiplistes (503)
- crayons (501)
- wcalendar (474)
- agenda (473)
- player (453)
- sitemap (443)
- accesrestreint (360)
- rechercheetendue (281)
- corbeille (261)
- typoenluminee (252)
- article_pdf (237)
- actijour (212)
- balisesession (190)
- gestiondocuments (168)
- enviar_email (160)
- boutonstexte (149)

.. Do you want to see more ? Just read the complete article smile

Read more...

! SPIP2.0 (and SPIP1.92f) released

, , ,

For more details :
http://www.spip.net/fr_article3784.html

A little changelog for SPIP2.0 :
- Translation in asturiano, Burmese, Khmer (Kampuchean), Indonesian, Swedish
- Unified private interface using AJAX
- Programming interface for SQL Server (MySQL, Postgres, SQLite)
- New forms for use on the site in public and private area
- Improved interface for documents and forums (documents joints possible)
- Access to several databases from a single skeleton
- Models and pagination in AJAX by simply adding a new criterion
- Hierarchical URLs (like: http://www.example.com/sector/section1/subsection2/article_name)
- Automatic compaction of CSS and javascript files
- Amelioration of the filter system and automatic installer
- And more...

Modifications between 1.9.2e of 13 September 2008 (svn [12624])
and 1.9.2f of 10 December 2008 (svn [13443]):

- Correction of a spelling error in the language list
- Correction of the criteria {par multi titre} in MySQL 5 and utf-8 (alphabetical sorting correct even with accented characters)
- Correction of the RSS of del.icio.us
- Unification of the calculation of the date of publication (now in php) in case of time lag between php and sql
- Optimization of SQL (use of the MySQL requests cache)
- Protection of redirects urls (not < or ")
- Corrections of Ukrainian
- Fix of a security problem