1. 14 Dec, 2020 1 commit
  2. 11 Dec, 2020 1 commit
  3. 31 Mar, 2020 1 commit
    • Philippe Pepiot's avatar
      [server] prevent returning closed cursor to the database pool · 1d2c1404a96a
      Philippe Pepiot authored
      In since c8c6ad8adbdb init_repository use repo.internal_cnx() instead of
      repo.system_source.get_connection() so it use the pool and we should not close
      cursors from the pool before returning it back. Otherwise we may have
      "connection already closed" error.
      This bug only trigger when connection-pool-size = 1. Since we are moving to use
      a dynamic pooler we need to get this fixed.
      This does not occur with sqlite since the connection wrapper instantiate new
      cursor everytime, but this occur with other databases.
      branch : 3.26
  4. 10 Dec, 2020 1 commit
    • Nicola Spanti's avatar
      [server] Set language of connection in all cases · 2f450a68ad7f
      Nicola Spanti authored
      If `self.lang` was already defined (aka not `None`), the language
      was not set. In consequence, when a pview was called, the language
      was always considered to be english, this piece of information is
      used by gettext, so it resulted in translation always done in
      english language instead of using user preference as excepted.
      closes #87
      branch : 3.26
  5. 22 Sep, 2020 1 commit
  6. 25 Sep, 2020 1 commit
  7. 18 Sep, 2020 1 commit
  8. 05 Mar, 2020 3 commits
  9. 25 Feb, 2020 4 commits
    • Julien Tayon's avatar
      [ldapfeed] add option to enable starttls on ldap servers · 2ad148f22c2f
      Julien Tayon authored
      Modern ldap servers connection often use, or even require starttls.
      branch : 3.26
    • Philippe Pepiot's avatar
      [ldapfeed] re-enable ldap tests for python 3.7 · 4ebfdf607b49
      Philippe Pepiot authored
      This was disabled because ldap3<2 wasn't compatible with python 3.7
      While I'm here, drop unseless newline.
      branch : 3.26
    • Julien Tayon's avatar
      [ldapfeed] make code compatible with ldap3>=2 · 5c35b94debfc
      Julien Tayon authored
      * Some constants have been renamed.
      * Directly bind when data-cnx-dn/data-cnx-password are provided, some servers,
        including ours require this.
      * Use raise_exceptions=True to avoid ignored ldap errors
      * raise in case of failed anonymous bind
      * do not search for "dn" attribute because this raise an "invalid attribute"
        with new ldap3 versions
      * Password is now returned as bytes, so no longer need to encode them before crypt.
      * modification_date is now returned as a datetime object
      Co-Authored-By: Philippe Pepiot's avatarPhilippe Pepiot <philippe.pepiot@logilab.fr>
      Closes #16073071
      branch : 3.26
    • Philippe Pepiot's avatar
      [ldapfeed] use LDAP_SCOPES to find user-scope · 1206b6fa1173
      Philippe Pepiot authored
      We already have LDAP_SCOPES dict defining possible scopes, this avoid possible code injection from config...
      Thus we can drop global variables already defined in LDAP_SCOPES since they are not used directly anymore.
      branch : 3.26
  10. 13 Feb, 2020 1 commit
  11. 12 Feb, 2020 1 commit
  12. 10 Feb, 2020 1 commit
  13. 27 Aug, 2019 1 commit
  14. 26 Jun, 2019 1 commit
  15. 11 Sep, 2019 3 commits
    • Laurent Peuch's avatar
      [fix] reference to underclared and unused variable kwargs · 1853c5e13154
      Laurent Peuch authored
      branch : 3.26
    • Philippe Pepiot's avatar
      Avoid to update inlined relation column to NULL when deleting entities · 1a2c7d6397ec
      Philippe Pepiot authored
      When deleting entities, cubicweb run a rql DELETE on all relations to trigger hooks.
      For an inlined relation this also mean set the column to NULL. This operation
      may fail if there's additional constraints on the column.
      Also this is a weird and useless behavior since deleting the entity row will by
      definition delete the relation.
      We still doesn't handle the case where both subject and object are going to be
      deleted because rows need to be deleted in a particular order that cubicweb
      doesn't handle.
      Add a test checking UPDATE does not occur but hooks are correctly called.
      Closes #17236690
      branch : 3.26
    • Philippe Pepiot's avatar
      Drop useless ConstraintInsertionTC · 0481ece35cb2
      Philippe Pepiot authored
      This test does nothing and is here from the begining of repo history.
      Now it raise an error "TypeError: Skipped expected string as 'msg' parameter, got 'SkipTest' instead. Perhaps you meant to use a mark?"
      Just drop it.
      branch : 3.26
  16. 06 Aug, 2019 2 commits
    • Denis Laxalde's avatar
      [pkg] version 3.26.14 · 172f683a84f6
      Denis Laxalde authored
      branch : 3.26
    • Denis Laxalde's avatar
      [py3] Pass bytes as "msg" to smtplib.SMTP.sendmail() · 9fb4a71f119d
      Denis Laxalde authored
      When passing a unicode string to smtplib.SMTP.sendmail() as "msg"
      argument, there is an implicit bytes encoding using "ascii" encoding in
      python3. Of course this does not work if the string contains non-ASCII
      characters. In fact, config's sendmails method intent to pass bytes to
      smtplib.SMTP.sendmail() as it uses msg.as_string() method.
      Unfortunately, in python3, this method returns a unicode string whereas
      it returns a bytes string in python2; we thus fix this by calling
      as_bytes() method on python3.
      As there is no "as_bytes" method in python2, we need to handle python2
      compatibility by hand and either call as_string() or as_bytes().
      In testlib, where we mock smtplib.SMTP, we need to keep the "msg"
      argument of Email class (defined in testlib as well) a unicode string.
      Otherwise, it fails to be parsed by email.message_from_string() (from
      stdlib) if it is bytes on python3.
      branch : 3.26
  17. 24 Jul, 2019 2 commits
  18. 10 Jul, 2019 1 commit
    • Jérémy Bobbio (Lunar)'s avatar
      [skeleton] Update Debian packaging template · 376168d1b14a
      Jérémy Bobbio (Lunar) authored
      Here are multiple updates to the Debian packaging template provided when
      running `cubicweb-ctl newcube`:
       * Switch to source format 3.0 (quilt).
       * Switch to debhelper 9.
       * Switch to dh-python.
       * Add Python 3 packages.
       * Name the binary packages `python-cubicweb-CUBENAME` and
         `python3-cubicweb-CUBENAME` instead of just `cubicweb-CUBENAME` (which is
         still the source package).
       * Populate Depends using dh_python{2,3} support for Python requirements.
       * Run test suite at build time using pytest.
       * Add autopkgtest to run test suite against the installed package.
       * Bump Standards-Version to 4.3.0.
      branch : 3.26
  19. 26 Jun, 2019 1 commit
  20. 17 Jun, 2019 1 commit
  21. 02 Jul, 2019 1 commit
  22. 27 Jun, 2019 3 commits
    • Denis Laxalde's avatar
      [autoform] Fix display_fields handling · 9f03df82f8de
      Denis Laxalde authored
      This follows-up on changeset b2ceb483e056 (present in 3.25 as well), in
      which AutomaticEntityForm.editable_attributes() was turned into a
      generator. In this method, in case display_fields is not None, we
      previously returned a list of (rtype, role); this was changed into a
      yield, but the change was missing a return after the loop in order not
      to go through the remainder of the function.
      Add tests for editable_attributes() method.
      branch : 3.26
    • Denis Laxalde's avatar
      Flake8 cubicweb/web/views/autoform.py · c96aa316d06b
      Denis Laxalde authored
        cubicweb/web/views/autoform.py:703: [E122] continuation line missing indentation or outdented
        cubicweb/web/views/autoform.py:704: [E122] continuation line missing indentation or outdented
        cubicweb/web/views/autoform.py:819: [W504] line break after binary operator
        cubicweb/web/views/autoform.py:820: [E125] continuation line with same indent as next logical line
        cubicweb/web/views/autoform.py:961: [W504] line break after binary operator
        cubicweb/web/views/autoform.py:962: [E126] continuation line over-indented for hanging indent
      branch : 3.26
    • Denis Laxalde's avatar
      [py3] unicode() -> six.text_type in autoform · ea89ca9017c4
      Denis Laxalde authored
      branch : 3.26
  23. 13 Jun, 2019 1 commit
  24. 07 Jun, 2019 1 commit
  25. 21 May, 2019 1 commit
  26. 16 May, 2019 1 commit
    • Julien Tayon's avatar
      [ldapfeed] FIX: Unique Key violation when synchronizing with LDAPfeed · 3f125fdbcd70
      Julien Tayon authored
      What was happening
      The bug appears when ldapfeed tries to insert a user while another user exists
      exists with a different source.
      Simple use case to reproduce:
      - create a local user in cubicweb (source=system)
      - sync with ldap
      - ldapfeed will stop complaining user already exists.
      Without next patch the test MUST fail with message:
      cubicweb/server/sources/native.py:714: UniqueTogetherError
      The ldapfeed is thus stopped ignoring any further ldap entries.
      The proposal
      Prior to this patch, the insertion was trying to create all CWUser with the
      computed login from eeimporter.extid2eid (method process of DataFeedLDAPAdapter).
      When a CWUser existed with a different cw_source ("system" for user created
      with cubicweb for instance), it created a conflict.
      To avoid collisions, in the extentities_generator method a bypass
      was added at the insertion layer.
      Prior to insertion the absence of the computed login is checked on a list of
      all existing login from a different source.
      If collision is detected, we skip the ldap record.
      By short circuiting at the CWUser entity insertion level we also avoid to treat
      CWGroup and EmailAddress related to this user.
      Hence ensuring a behaviour that will not break existing instances.
      (conservative approach: faced with ambiguity better do nothing than guess).
      An error message is added stating explicitly the conflict.
      branch : 3.26
  27. 15 Mar, 2019 1 commit
    • Denis Laxalde's avatar
      Skip tests for ldapsource with python >= 3.7 · f59439bac0a8
      Denis Laxalde authored
      Until someone works on fixing these, this should make our CI green
      I tried to use setupModule() to check for python version, but
      pre_setup_database() is apparently called even when a SkipTest exception
      is raised there. So handle this in that method.
      (grafted from 4d68d20427de)
      branch : 3.26
  28. 16 May, 2019 2 commits
    • Denis Laxalde's avatar
      Flake8 crypto module · bfab695b740a
      Denis Laxalde authored
      branch : 3.26
    • Denis Laxalde's avatar
      Make crypto module python3-compatible · 7abe23cbfda1
      Denis Laxalde authored
      * Remove usage of unicode() and decode the base64-encoded string in
      * Encode the string received in decrypt() as (I supposed) it should come
        from the result of encrypt().
      Add tests for this module along the way.
      branch : 3.26