(allura) branch master updated: bump gunicorn 22.0.0 -> 23.0.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new a5912136b bump gunicorn 22.0.0 -> 23.0.0 a5912136b is described below commit a5912136ba7d22ff941a15820ced1a42799d62a5 Author: Guillermo Cruz AuthorDate: Mon Sep 2 15:16:27 2024 + bump gunicorn 22.0.0 -> 23.0.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f753c681e..ab02f105a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -72,7 +72,7 @@ gitdb==4.0.11 # via gitpython gitpython==3.1.43 # via -r requirements.in -gunicorn==22.0.0 +gunicorn==23.0.0 # via -r requirements.in html5lib==1.1 # via
(allura) 04/05: be explicit about docValues for faceting used on tickets
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 0d510374fec0ed61c31f5e24abea49e1fdaf5b67 Author: Dave Brondsema AuthorDate: Wed Aug 21 15:55:11 2024 -0400 be explicit about docValues for faceting used on tickets --- ForgeTracker/forgetracker/search.py | 1 + solr_config/allura/conf/schema.xml | 6 ++ 2 files changed, 7 insertions(+) diff --git a/ForgeTracker/forgetracker/search.py b/ForgeTracker/forgetracker/search.py index aaec822ea..10cd3c083 100644 --- a/ForgeTracker/forgetracker/search.py +++ b/ForgeTracker/forgetracker/search.py @@ -22,6 +22,7 @@ import six FACET_PARAMS = { 'facet': 'true', +# fields used in faceting should have docValues="true" in solr, for faster performance 'facet.field': ['_milestone_s', 'status_s', 'assigned_to_s', 'reported_by_s'], 'facet.limit': -1, 'facet.sort': 'index', diff --git a/solr_config/allura/conf/schema.xml b/solr_config/allura/conf/schema.xml index fcb1ced3b..8c0059b51 100644 --- a/solr_config/allura/conf/schema.xml +++ b/solr_config/allura/conf/schema.xml @@ -112,6 +112,12 @@ + + + + +
(allura) 05/05: add storeOffsetsWithPositions in case "unified" highligher is used in future, it gives better performance
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 2b6eec65dd5603de7688b8249ca99ce596a75ea3 Author: Dave Brondsema AuthorDate: Wed Aug 21 16:56:10 2024 -0400 add storeOffsetsWithPositions in case "unified" highligher is used in future, it gives better performance --- solr_config/allura/conf/schema.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr_config/allura/conf/schema.xml b/solr_config/allura/conf/schema.xml index 8c0059b51..db77da282 100644 --- a/solr_config/allura/conf/schema.xml +++ b/solr_config/allura/conf/schema.xml @@ -108,7 +108,7 @@ - +
(allura) 01/05: set solr.use_new_types=true for tests
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit f4f060311dbf645a9a3bb8ebb95549674683f298 Author: Dave Brondsema AuthorDate: Tue Jul 30 15:17:00 2024 -0400 set solr.use_new_types=true for tests --- Allura/test.ini | 3 --- ForgeTracker/forgetracker/tests/unit/test_globals_model.py | 7 --- ForgeTracker/forgetracker/tests/unit/test_root_controller.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Allura/test.ini b/Allura/test.ini index d7a870deb..8c3604c11 100644 --- a/Allura/test.ini +++ b/Allura/test.ini @@ -81,9 +81,6 @@ support_tool_choices = wiki tickets discussion ; tests expect max length of 4 markdown_render_max_length = 4 -; TODO: update tests and let this be true -solr.use_new_types = false - ; TODO: update tests and remove this setting override auth.require_email_addr = false diff --git a/ForgeTracker/forgetracker/tests/unit/test_globals_model.py b/ForgeTracker/forgetracker/tests/unit/test_globals_model.py index 9353d6b9f..99b6336a6 100644 --- a/ForgeTracker/forgetracker/tests/unit/test_globals_model.py +++ b/ForgeTracker/forgetracker/tests/unit/test_globals_model.py @@ -151,15 +151,16 @@ class TestCustomFields(TrackerTestWithModel): tracker_globals = globals_with_custom_fields( [dict(label='Iteration Number', name='_iteration_number', + type='number', show_in_search=False), dict(label='Point Estimate', name='_point_estimate', + type='number', show_in_search=True)]) -expected = [dict(sortable_name='_point_estimate_s', +expected = [dict(sortable_name='_point_estimate_d', name='_point_estimate', label='Point Estimate')] -assert tracker_globals.sortable_custom_fields_shown_in_search( -) == expected +assert tracker_globals.sortable_custom_fields_shown_in_search() == expected def globals_with_custom_fields(custom_fields): diff --git a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py index 43414cb8c..d0af09fcc 100644 --- a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py +++ b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py @@ -45,7 +45,7 @@ class TestWhenSearchingWithCustomFields(WithUserAndBugsApp): self.response = tracker_main.RootController().search(q='friends') def test_that_sortable_custom_fields_are_present(self): -expected = [dict(sortable_name='_iteration_number_s', +expected = [dict(sortable_name='_iteration_number_d', name='_iteration_number', label='Iteration Number')] assert self.response['sortable_custom_fields'] == expected
(allura) branch master updated (2cb75a4d1 -> 2b6eec65d)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 2cb75a4d1 bump WebOb 1.8.7 -> 1.8.8 new f4f060311 set solr.use_new_types=true for tests new 760dede19 clean up unused solr fields new c8638b5e3 enable autoSoftCommit in config, since commitWithin from code doesn't seem to be working new 0d510374f be explicit about docValues for faceting used on tickets new 2b6eec65d add storeOffsetsWithPositions in case "unified" highligher is used in future, it gives better performance The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/lib/solr.py | 7 ++ Allura/test.ini| 3 - ForgeTracker/forgetracker/search.py| 1 + .../forgetracker/tests/unit/test_globals_model.py | 7 +- .../tests/unit/test_root_controller.py | 2 +- solr_config/allura/conf/schema.xml | 77 ++ solr_config/allura/conf/solrconfig.xml | 2 +- 7 files changed, 21 insertions(+), 78 deletions(-)
(allura) 02/05: clean up unused solr fields
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 760dede19609f818410b6f6c9a37b754337f3ac9 Author: Dave Brondsema AuthorDate: Wed Aug 14 09:57:25 2024 -0400 clean up unused solr fields --- Allura/allura/lib/solr.py | 7 solr_config/allura/conf/schema.xml | 69 -- 2 files changed, 7 insertions(+), 69 deletions(-) diff --git a/Allura/allura/lib/solr.py b/Allura/allura/lib/solr.py index 49c76afb3..7635b36d6 100644 --- a/Allura/allura/lib/solr.py +++ b/Allura/allura/lib/solr.py @@ -154,6 +154,13 @@ class MockSOLR: for o in objects: o['text'] = ''.join(o['text']) json.dumps(o) # ensure no errors (since pysolr 3.9+ uses json API to solr) +for k in o.keys(): +if k.endswith(('_i', '_s', '_l', '_t', '_b', '_f', '_d', '_dt', '_ws')): +continue +elif k in ('id', 'text', 'title'): +continue +else: +raise ValueError(f'Unexpected solr field {k!r}, probably not in schema.xml') self.db[o['id']] = o def commit(self): diff --git a/solr_config/allura/conf/schema.xml b/solr_config/allura/conf/schema.xml index afca49639..fcb1ced3b 100644 --- a/solr_config/allura/conf/schema.xml +++ b/solr_config/allura/conf/schema.xml @@ -111,72 +111,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(allura) 03/05: enable autoSoftCommit in config, since commitWithin from code doesn't seem to be working
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit c8638b5e37914996a362b81e80f13234e19ffe75 Author: Dave Brondsema AuthorDate: Wed Aug 14 09:57:57 2024 -0400 enable autoSoftCommit in config, since commitWithin from code doesn't seem to be working --- solr_config/allura/conf/solrconfig.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr_config/allura/conf/solrconfig.xml b/solr_config/allura/conf/solrconfig.xml index 6e3d4e9c6..06e7fc1e5 100644 --- a/solr_config/allura/conf/solrconfig.xml +++ b/solr_config/allura/conf/solrconfig.xml @@ -192,7 +192,7 @@ faster and more near-realtime friendly than a hard commit. --> - ${solr.autoSoftCommit.maxTime:-1} + ${solr.autoSoftCommit.maxTime:2000}
(allura) branch master updated: bump WebOb 1.8.7 -> 1.8.8
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 2cb75a4d1 bump WebOb 1.8.7 -> 1.8.8 2cb75a4d1 is described below commit 2cb75a4d17c37c33fecc868bd640fd3348a411fe Author: Guillermo Cruz AuthorDate: Thu Aug 15 14:52:29 2024 + bump WebOb 1.8.7 -> 1.8.8 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2cfdf6c08..f753c681e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -258,7 +258,7 @@ webencodings==0.5.1 # tinycss2 webhelpers2==2.1 # via -r requirements.in -webob==1.8.7 +webob==1.8.8 # via # -r requirements.in # easywidgets
(allura) 03/05: [#8566] make some tests run on their own (and in parallel) without error
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 9d720f8c14c71be42a4b70f78bcfbfe37254a92e Author: Dave Brondsema AuthorDate: Wed Jul 10 16:51:16 2024 -0400 [#8566] make some tests run on their own (and in parallel) without error --- Allura/allura/tests/test_globals.py | 8 +--- Allura/allura/tests/test_plugin.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py index ec2718da5..e3f9e10bf 100644 --- a/Allura/allura/tests/test_globals.py +++ b/Allura/allura/tests/test_globals.py @@ -765,6 +765,7 @@ class Test(): class TestCachedMarkdown(unittest.TestCase): def setup_method(self, method): +setup() self.md = ForgeMarkdown() self.post = M.Post() self.post.text = '**bold**' @@ -775,9 +776,10 @@ class TestCachedMarkdown(unittest.TestCase): self.md.cached_convert(self.post, 'no_such_field') def test_missing_cache_field(self): -delattr(self.post, 'text_cache') -html = self.md.cached_convert(self.post, 'text') -self.assertEqual(html, self.expected_html) +with h.push_context('test', 'wiki', neighborhood='Projects'): +delattr(self.post, 'text_cache') +html = self.md.cached_convert(self.post, 'text') +self.assertEqual(html, self.expected_html) @patch.dict('allura.lib.app_globals.config', markdown_cache_threshold='-0.01') def test_non_ascii(self): diff --git a/Allura/allura/tests/test_plugin.py b/Allura/allura/tests/test_plugin.py index 90e65ee1c..5bdaf5751 100644 --- a/Allura/allura/tests/test_plugin.py +++ b/Allura/allura/tests/test_plugin.py @@ -259,6 +259,7 @@ class TestProjectRegistrationProviderPhoneVerification: assert result == g.phone_service.verify.return_value assert 2 == g.phone_service.verify.call_count +@patch('allura.lib.helpers.request', Request.blank('/')) @patch.object(plugin, 'g') def test_verify_phone_max_limit_reached(self, g): g.phone_service = Mock(spec=phone.PhoneService)
(allura) branch master updated (db1a3e472 -> 556a7da15)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from db1a3e472 [#422] Fix on allura-api.json file new b8b1ac439 [#8566] support more password hashing algorithms new 56238cfc0 [#8566] cleaner "raises" checking in tests new 9d720f8c1 [#8566] make some tests run on their own (and in parallel) without error new 71a71cc33 [#8566] fix some test warnings new 556a7da15 [#8566] remove old test helpers The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/lib/markdown_extensions.py | 13 +- Allura/allura/lib/plugin.py| 189 ++--- Allura/allura/model/auth.py| 3 +- Allura/allura/scripts/trac_export.py | 2 +- Allura/allura/tests/decorators.py | 13 +- Allura/allura/tests/functional/test_admin.py | 8 +- Allura/allura/tests/functional/test_auth.py| 18 +- Allura/allura/tests/functional/test_home.py| 6 +- Allura/allura/tests/model/test_artifact.py | 3 +- Allura/allura/tests/model/test_auth.py | 8 +- Allura/allura/tests/model/test_notification.py | 4 +- Allura/allura/tests/model/test_repo.py | 4 +- Allura/allura/tests/test_app.py| 6 +- Allura/allura/tests/test_commands.py | 56 +++--- Allura/allura/tests/test_globals.py| 15 +- Allura/allura/tests/test_helpers.py| 7 +- Allura/allura/tests/test_plugin.py | 87 -- Allura/allura/tests/test_utils.py | 30 ++-- .../tests/unit/test_helpers/test_set_context.py| 18 +- .../allura/tests/unit/test_ldap_auth_provider.py | 38 +++-- .../allura/tests/unit/test_package_path_loader.py | 15 +- Allura/allura/websetup/bootstrap.py| 18 +- Allura/development.ini | 26 ++- AlluraTest/alluratest/tools.py | 64 --- .../forgediscussion/tests/functional/test_forum.py | 8 +- .../forgeimporters/tests/forge/test_tracker.py | 8 +- .../forgeimporters/trac/tests/test_tickets.py | 11 +- ForgeSVN/forgesvn/tests/model/test_repository.py | 4 +- pytest.ini | 4 + requirements-optional.txt | 4 + requirements.in| 1 + requirements.txt | 6 +- 32 files changed, 413 insertions(+), 284 deletions(-)
(allura) 05/05: [#8566] remove old test helpers
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 556a7da15b6cc1832e4a8da0b3cd7cb71134e120 Author: Dave Brondsema AuthorDate: Fri Jul 12 12:26:30 2024 -0400 [#8566] remove old test helpers --- AlluraTest/alluratest/tools.py | 64 -- 1 file changed, 64 deletions(-) diff --git a/AlluraTest/alluratest/tools.py b/AlluraTest/alluratest/tools.py index efd93e9d4..c71c62e66 100644 --- a/AlluraTest/alluratest/tools.py +++ b/AlluraTest/alluratest/tools.py @@ -37,70 +37,6 @@ def with_setup(setup, teardown=None): return with_setup__wrapper -def raises(ExcType): -@decorator -def inner_raises(func, *a, **kw): -with testcase.assertRaises(ExcType): -return func(*a, **kw) -return inner_raises - - -def assert_equal(*a, **kw): -return testcase.assertEqual(*a, **kw) - - -def assert_equals(*a, **kw): -return testcase.assertEqual(*a, **kw) - - -def assert_not_equal(*a, **kw): -return testcase.assertNotEqual(*a, **kw) - - -def assert_raises(*a, **kw): -return testcase.assertRaises(*a, **kw) - - -def assert_is_none(*a, **kw): -return testcase.assertIsNone(*a, **kw) - - -def assert_is_not_none(*a, **kw): -return testcase.assertIsNotNone(*a, **kw) - - -def assert_is(*a, **kw): -return testcase.assertIs(*a, **kw) - - -def assert_true(*a, **kw): -return testcase.assertTrue(*a, **kw) - - -def assert_false(*a, **kw): -return testcase.assertFalse(*a, **kw) - - -def assert_in(*a, **kw): -return testcase.assertIn(*a, **kw) - - -def assert_not_in(*a, **kw): -return testcase.assertNotIn(*a, **kw) - - -def assert_less(*a, **kw): -return testcase.assertLess(*a, **kw) - - -def assert_greater(*a, **kw): -return testcase.assertGreater(*a, **kw) - - -def assert_greater_equal(*a, **kw): -return testcase.assertGreaterEqual(*a, **kw) - - def assert_regexp_matches(*a, **kw): return testcase.assertRegex(*a, **kw)
(allura) 02/05: [#8566] cleaner "raises" checking in tests
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 56238cfc05c015e34100f073f55e29388e5774cc Author: Dave Brondsema AuthorDate: Fri Jul 12 10:39:26 2024 -0400 [#8566] cleaner "raises" checking in tests --- Allura/allura/tests/model/test_artifact.py | 3 +- Allura/allura/tests/model/test_notification.py | 4 +- Allura/allura/tests/model/test_repo.py | 4 +- Allura/allura/tests/test_app.py| 6 ++- Allura/allura/tests/test_commands.py | 56 +++--- Allura/allura/tests/test_globals.py| 7 ++- Allura/allura/tests/test_helpers.py| 7 ++- Allura/allura/tests/test_plugin.py | 19 Allura/allura/tests/test_utils.py | 30 ++-- .../tests/unit/test_helpers/test_set_context.py| 18 +++ .../allura/tests/unit/test_package_path_loader.py | 15 +++--- .../forgeimporters/tests/forge/test_tracker.py | 8 ++-- .../forgeimporters/trac/tests/test_tickets.py | 11 ++--- ForgeSVN/forgesvn/tests/model/test_repository.py | 4 +- 14 files changed, 100 insertions(+), 92 deletions(-) diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py index d63a2041e..33274bda6 100644 --- a/Allura/allura/tests/model/test_artifact.py +++ b/Allura/allura/tests/model/test_artifact.py @@ -165,7 +165,8 @@ class TestArtifact: assert ss.shorthand_id() == pg.shorthand_id() + '#2' assert ss.title == pg.title assert ss.text == pg.text -pytest.raises(IndexError, pg.get_version, 42) +with pytest.raises(IndexError): +pg.get_version(42) pg.revert(1) pg.commit() ThreadLocalODMSession.flush_all() diff --git a/Allura/allura/tests/model/test_notification.py b/Allura/allura/tests/model/test_notification.py index 920157598..9fdf2385c 100644 --- a/Allura/allura/tests/model/test_notification.py +++ b/Allura/allura/tests/model/test_notification.py @@ -19,6 +19,7 @@ import unittest from datetime import timedelta import collections +import pytest from tg import tmpl_context as c, app_globals as g from ming.odm import ThreadLocalODMSession import mock @@ -341,7 +342,8 @@ class TestSubscriptionTypes(unittest.TestCase): M.notification.MAILBOX_QUIESCENT = timedelta(minutes=1) # will raise "assert msg is not None" since the new message is not 1 # min old: -self.assertRaises(AssertionError, self._test_message) +with pytest.raises(AssertionError): +self._test_message() def _test_message(self): self._subscribe() diff --git a/Allura/allura/tests/model/test_repo.py b/Allura/allura/tests/model/test_repo.py index 9081319e0..0a91d690b 100644 --- a/Allura/allura/tests/model/test_repo.py +++ b/Allura/allura/tests/model/test_repo.py @@ -20,6 +20,7 @@ from collections import defaultdict, OrderedDict import unittest import mock +import pytest from tg import tmpl_context as c from bson import ObjectId from ming.odm import session @@ -413,7 +414,8 @@ class TestModelCache(unittest.TestCase): n = mock.Mock(spec_set=['foo'], foo='qux') self.assertEqual(self.cache._model_query(q), 'foo') self.assertEqual(self.cache._model_query(m), 'bar') -self.assertRaises(AttributeError, self.cache._model_query, [n]) +with pytest.raises(AttributeError): +self.cache._model_query([n]) @mock.patch.object(M.repository.Tree.query, 'get') @mock.patch.object(M.repository.LastCommit.query, 'get') diff --git a/Allura/allura/tests/test_app.py b/Allura/allura/tests/test_app.py index cffe3fb5d..913840315 100644 --- a/Allura/allura/tests/test_app.py +++ b/Allura/allura/tests/test_app.py @@ -71,8 +71,10 @@ class TestApp: v = fev.NotEmpty() opt = app.ConfigOption('test1', str, None, validator=v) assert opt.validate('val') == 'val' -pytest.raises(fev.Invalid, opt.validate, None) -pytest.raises(fev.Invalid, opt.validate, '') +with pytest.raises(fev.Invalid): +opt.validate(None) +with pytest.raises(fev.Invalid): +opt.validate('') def test_options_on_install_default(self): a = app.Application(c.project, c.app.config) diff --git a/Allura/allura/tests/test_commands.py b/Allura/allura/tests/test_commands.py index 660b0f172..b5d74d78c 100644 --- a/Allura/allura/tests/test_commands.py +++ b/Allura/allura/tests/test_commands.py @@ -53,8 +53,8 @@ def test_script(): cmd = script.ScriptCommand('script') cmd.run( [test_config, pkg_resources.resource_filename('allura', &
(allura) 04/05: [#8566] fix some test warnings
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 71a71cc334a95b6762d559c1ecdc3e2e9a0de6ba Author: Dave Brondsema AuthorDate: Wed Jul 10 17:17:14 2024 -0400 [#8566] fix some test warnings --- Allura/allura/lib/markdown_extensions.py| 13 + Allura/allura/scripts/trac_export.py| 2 +- Allura/allura/tests/functional/test_admin.py| 8 Allura/allura/tests/functional/test_auth.py | 2 +- .../forgediscussion/tests/functional/test_forum.py | 8 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py index b6d423d58..3e63e16f1 100644 --- a/Allura/allura/lib/markdown_extensions.py +++ b/Allura/allura/lib/markdown_extensions.py @@ -18,13 +18,14 @@ from __future__ import annotations import re import logging +import warnings from typing import List import xml.etree.ElementTree as etree from urllib.parse import urljoin from tg import config -from bs4 import BeautifulSoup +from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning import html5lib import html5lib.serializer import html5lib.filters.alphabeticalattributes @@ -474,9 +475,13 @@ class RelativeLinkRewriter(markdown.postprocessors.Postprocessor): def __init__(self, make_absolute=False): self._make_absolute = make_absolute -def run(self, text): -soup = BeautifulSoup(text, - 'html5lib') # 'html.parser' parser gives weird behaviour with test_macro_members +def run(self, text: str): +with warnings.catch_warnings(): +# sometimes short snippets of code (especially escaped html) can trigger this +warnings.filterwarnings('ignore', category=MarkupResemblesLocatorWarning) + +soup = BeautifulSoup(text, + 'html5lib') # 'html.parser' parser gives weird behaviour with test_macro_members if self._make_absolute: rewrite = self._rewrite_abs diff --git a/Allura/allura/scripts/trac_export.py b/Allura/allura/scripts/trac_export.py index ce9d2c9e2..c9f5a0e70 100644 --- a/Allura/allura/scripts/trac_export.py +++ b/Allura/allura/scripts/trac_export.py @@ -210,7 +210,7 @@ class TracExport: d['size'] = int(self.match_pattern(SIZE_PATTERN, size_s)) timestamp_s = attach.find('a', {'class': 'timeline'})['title'] d['date'] = self.trac2z_date(self.match_pattern(TIMESTAMP_PATTERN, timestamp_s)) -d['by'] = attach.find(text=re.compile('added by')).nextSibling.text +d['by'] = attach.find(string=re.compile('added by')).nextSibling.text d['description'] = '' # Skip whitespace while attach.nextSibling and isinstance(attach.nextSibling, NavigableString): diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py index 62d7111d8..d0d6ee260 100644 --- a/Allura/allura/tests/functional/test_admin.py +++ b/Allura/allura/tests/functional/test_admin.py @@ -596,8 +596,8 @@ class TestProjectAdmin(TestController): def test_log_permission(self): r = self.app.get('/admin/wiki/permissions') select = r.html.find('select', {'name': 'card-0.new'}) -opt_admin = select.find(text='Admin').parent -opt_developer = select.find(text='Developer').parent +opt_admin = select.find(string='Admin').parent +opt_developer = select.find(string='Developer').parent assert opt_admin.name == 'option' assert opt_developer.name == 'option' @@ -627,8 +627,8 @@ class TestProjectAdmin(TestController): r = self.app.get('/test-subproject/admin/permissions/') assert len(r.html.findAll('input', {'name': 'card-0.value'})) == 0 select = r.html.find('select', {'name': 'card-0.new'}) -opt_admin = select.find(text='Admin').parent -opt_developer = select.find(text='Developer').parent +opt_admin = select.find(string='Admin').parent +opt_developer = select.find(string='Developer').parent assert opt_admin.name == 'option' assert opt_developer.name == 'option' with audits('updated "admin" permissions: "" => "Admin,Developer"'): diff --git a/Allura/allura/tests/functional/test_aut
(allura) 01/05: [#8566] support more password hashing algorithms
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit b8b1ac4397edb507b30de4041dd6862b0d846377 Author: Dave Brondsema AuthorDate: Tue Jul 2 18:08:27 2024 -0400 [#8566] support more password hashing algorithms - replace crypt with passlib - use recommended rounds & salts by default - automatically rehash user passwords to new algorithm upon login - some AuthProvider method changes - speed up bootstrap.py, since password hashing takes longer now --- Allura/allura/lib/plugin.py| 189 ++--- Allura/allura/model/auth.py| 3 +- Allura/allura/tests/decorators.py | 13 +- Allura/allura/tests/functional/test_auth.py| 16 +- Allura/allura/tests/functional/test_home.py| 6 +- Allura/allura/tests/model/test_auth.py | 8 +- Allura/allura/tests/test_plugin.py | 67 +++- .../allura/tests/unit/test_ldap_auth_provider.py | 38 +++-- Allura/allura/websetup/bootstrap.py| 18 +- Allura/development.ini | 26 ++- pytest.ini | 4 + requirements-optional.txt | 4 + requirements.in| 1 + requirements.txt | 6 +- 14 files changed, 288 insertions(+), 111 deletions(-) diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py index 0dea14d29..85076c6ce 100644 --- a/Allura/allura/lib/plugin.py +++ b/Allura/allura/lib/plugin.py @@ -24,8 +24,9 @@ import os import logging import subprocess import string -import crypt import random +import sys +import warnings from contextlib import contextmanager from urllib.parse import urlparse from io import BytesIO @@ -36,8 +37,10 @@ from datetime import datetime, timedelta import typing import calendar +import passlib.ifc import requests import six +from passlib.context import CryptContext try: import ldap @@ -49,8 +52,9 @@ import tg from tg import config, request, redirect, response, flash from tg import tmpl_context as c, app_globals as g from webob import exc, Request -from paste.deploy.converters import asbool, asint +from paste.deploy.converters import asbool, asint, aslist from formencode import validators as fev +from passlib.registry import get_crypt_handler from ming.utils import LazyProperty from ming.odm import state @@ -65,6 +69,7 @@ from allura.tasks.index_tasks import solr_del_project_artifacts if typing.TYPE_CHECKING: from allura.app import SitemapEntry +from allura import model as M log = logging.getLogger(__name__) @@ -93,6 +98,8 @@ class AuthenticationProvider: '/auth/multifactor', '/auth/do_multifactor', ] +cfg_prefix_pwds = 'auth.password.' +default_pwd_algo = 'scrypt' # noqa: S105 def __init__(self, request): self.request = request @@ -264,12 +271,23 @@ class AuthenticationProvider: self.session.save() response.set_cookie('memorable_forget', '/', secure=request.environ['beaker.session'].secure) -def validate_password(self, user, password): +def validate_password(self, user: M.User, password: str) -> bool: +ok = self._validate_password(user, password) +if ok: +self.rehash_password_if_needed(user, password) +return ok + +def rehash_password_if_needed(self, user: M.User, password: str) -> None: +if user.password_algorithm != self._password_algorithm(): +self.set_password(user, None, password, set_timestamp=False) +h.auditlog_user('Rehashed password automatically', user=user) + +def _validate_password(self, user: M.User, password: str) -> bool: '''Check that provided password matches actual user password :rtype: bool ''' -raise NotImplementedError('validate_password') +raise NotImplementedError('_validate_password') def disable_user(self, user, **kw): '''Disable user account''' @@ -295,13 +313,15 @@ class AuthenticationProvider: ''' raise NotImplementedError('by_username') -def set_password(self, user, old_password, new_password): +def set_password(self, user: M.User, old_password: str | None, new_password: str, set_timestamp=True): ''' Set a user's password. -A provider implementing this method should store the timestamp of this change, either +A provider implementing this method should store the timestamp of this change when set_timestamp=True, either
(allura) branch gc/8567 updated: [#8567] readded deleted condition for pre-commit v3.5.0 in requirements.txt
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8567 by this push: new 0fde7363e [#8567] readded deleted condition for pre-commit v3.5.0 in requirements.txt 0fde7363e is described below commit 0fde7363e927cfa7320d5fd14b0aa1751c091850 Author: Guillermo Cruz AuthorDate: Fri Jul 26 14:48:09 2024 -0600 [#8567] readded deleted condition for pre-commit v3.5.0 in requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 343b58ea5..05e140fd5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -140,6 +140,7 @@ platformdirs==4.2.2 # via virtualenv pluggy==1.5.0 # via pytest +pre-commit==3.5.0 ; python_version < "3.9" pre-commit==3.7.1 ; python_version >= "3.9" # via -r requirements.in profanityfilter==2.0.6
(allura) branch master updated (57d1aca95 -> db1a3e472)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 57d1aca95 [#9485] Disable OAuth2 authorize button and change its text value on click new 13ec9081a [#422] json file to generate openapi allura api docs new dd9516872 [#422] Update on allura-api.json file new db1a3e472 [#422] Fix on allura-api.json file The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/docs/api-rest/allura-api.json | 4607 ++ 1 file changed, 4607 insertions(+) create mode 100644 Allura/docs/api-rest/allura-api.json
(allura) 02/03: [#422] Update on allura-api.json file
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit dd9516872dc592a2d98bcd4bcb8872178e934d99 Author: Daniel Castillo AuthorDate: Wed Jul 24 21:22:36 2024 + [#422] Update on allura-api.json file --- Allura/docs/api-rest/allura-api.json | 53 ++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/Allura/docs/api-rest/allura-api.json b/Allura/docs/api-rest/allura-api.json index 2c5ce001b..63c91cb38 100644 --- a/Allura/docs/api-rest/allura-api.json +++ b/Allura/docs/api-rest/allura-api.json @@ -3,9 +3,12 @@ "info": { "title": "Apache Allura", "description": "
(allura) 03/03: [#422] Fix on allura-api.json file
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit db1a3e4720ecff0c175c3470b24f6d7aa8bac526 Author: Daniel Castillo AuthorDate: Fri Jul 26 15:37:58 2024 + [#422] Fix on allura-api.json file --- Allura/docs/api-rest/allura-api.json | 84 ++-- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/Allura/docs/api-rest/allura-api.json b/Allura/docs/api-rest/allura-api.json index 63c91cb38..0d9df5a40 100644 --- a/Allura/docs/api-rest/allura-api.json +++ b/Allura/docs/api-rest/allura-api.json @@ -7,7 +7,7 @@ }, "x-servers": [{ "url": "https://forge-allura.apache.org/rest";, - "description": "Source Forge" + "description": "" }], "schemes": [ "https" @@ -205,7 +205,7 @@ "/{neighborhood}/add_project": { "post": { "operationId": "POST_neighborhood-add_project", - "summary":"Neighborhood add project", + "summary":"Add project", "responses": { "default": { "description": "" @@ -265,7 +265,7 @@ "/{neighborhood}/{project}": { "get": { "operationId": "GET_neighborhood-project", - "summary":"Neighborhood get project", + "summary":"Get project", "produces": [ "application/json" ], @@ -577,7 +577,7 @@ "get": { "description": "**Endpoints**\nPermissions can be checked at three levels:\n1. **Neighborhood:** `/rest/p/has_access`\n2. **Project:** `/rest/p/project_name/has_access`\n3. **Tool:** `/rest/p/project_name/mount_point/has_access`\n\n---\n\nIt is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has [...] "operationId": "GET_neighborhood-project-has_access", - "summary":"Neighborhood Project has_access", + "summary":"Project has_access", "responses": { "default": { "description": "" @@ -626,7 +626,7 @@ "/{neighborhood}/{project}/{scm_tool}": { "get": { "operationId": "GET_neighborhood-project-scm_tool", - "summary":"Neighborhood Project scm tool", + "summary":"Project scm tool", "produces": [ "application/json" ], @@ -747,7 +747,7 @@ "/{neighborhood}/{project}/{wiki}": { "get": { "operationId": "GET_neighborhood-project-wiki", - "summary":"Neighborhood Project wiki", + "summary":"Project wiki", "produces": [ "application/json" ], @@ -828,7 +828,7 @@ "/{neighborhood}/{project}/{wiki}/{title}": { "get": { "description": "returns a JSON representation of a page\n", - "summary":"Neighborhood Project wiki title", + "summary":"Project wiki title", "operationId": "GET_neighborhood-project-wiki-title", "produces": [ "application/json" @@ -913,7 +913,7 @@ }, "post": { "description": "Creates or updates the titled page.\n", - "summary":"Neighborhood Project update wiki title", + "summary":"Project update wiki title", "operationId": "POST_neighborhood-project-wiki-title", "responses": { "201": { @@ -974,7 +974,7 @@ "/{neighborhood}/{project}/{wiki}/has_access": { "get": { "description": "**Endpoints**\nPermissions can be checked at three levels:\n1. **Neighborhood:** `/rest/p/has_access`\n2. **Project:** `/rest/p/project_name/has_access`\n3. **Tool:** `/rest/p/project_name/mount_point/has_access`\n\n---\n\nIt is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requir
(allura) 01/01: update
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/new-branch in repository https://gitbox.apache.org/repos/asf/allura.git commit a78a32637be544018f6b44909dab54ec7959 Author: Guillermo Cruz AuthorDate: Tue Jul 23 12:56:39 2024 -0600 update --- .env | 1 + 1 file changed, 1 insertion(+) diff --git a/.env b/.env index 6c3824445..2021602c7 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ # Licensed to the Apache Software Foundation (ASF) under one +# new comment # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file
(allura) branch gc/new-branch created (now a78a32637)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch gc/new-branch in repository https://gitbox.apache.org/repos/asf/allura.git at a78a32637 update This branch includes the following new commits: new a78a32637 update The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) 10/12: [#8567] Upgrade pytest 8.1.1 -> 8.3.1 (OUTDATED! latest is: 8.2.2), and its deps: iniconfig,packaging,pluggy
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit fd4f0183a212e3955a2be7b1e23e719c6bf9a454 Author: Guillermo Cruz AuthorDate: Mon Jul 22 18:00:59 2024 + [#8567] Upgrade pytest 8.1.1 -> 8.3.1 (OUTDATED! latest is: 8.2.2), and its deps: iniconfig,packaging,pluggy pytest8.1.1 -> 8.3.1 (OUTDATED! latest is: 8.2.2) iniconfig 2.0.0 -> no upgrade packaging 24.0 -> 24.1 pluggy1.4.0 -> 1.5.0 --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 94871828f..f433fd77f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -116,7 +116,7 @@ oauthlib==3.2.2 # via # -r requirements.in # requests-oauthlib -packaging==24.0 +packaging==24.1 # via # gunicorn # pytest @@ -138,7 +138,7 @@ pillow==10.4.0 # via -r requirements.in platformdirs==4.2.0 # via virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via pytest pre-commit==3.7.0 ; python_version >= "3.9" # via -r requirements.in @@ -160,7 +160,7 @@ pypng==0.20220715.0 # via qrcode pysolr==3.9.0 # via -r requirements.in -pytest==8.1.1 +pytest==8.3.1 # via # -r requirements.in # pytest-sugar
(allura) 12/12: [#8567] Upgrade pre-commit 3.7.0 -> 3.7.1, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit e28b7cf3e1dc94d91014f6fc0bf8828eb05743ed Author: Guillermo Cruz AuthorDate: Mon Jul 22 18:14:53 2024 + [#8567] Upgrade pre-commit 3.7.0 -> 3.7.1, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs pre-commit3.7.0 -> 3.7.1 cfgv 3.4.0 -> no upgrade identify 2.5.35 -> 2.6.0 nodeenv 1.8.0 -> 1.9.1 setuptools 70.3.0 -> skipped PyYAML6.0.1 -> no upgrade virtualenv 20.25.3 -> 20.26.3 distlib 0.3.8 -> no upgrade filelock 3.13.4 -> 3.15.4 platformdirs 4.2.0 -> 4.2.2 --- requirements.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index eb87f29ca..343b58ea5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -58,7 +58,7 @@ feedgenerator==2.1.0 # via -r requirements.in feedparser==6.0.11 # via -r requirements.in -filelock==3.13.4 +filelock==3.15.4 # via virtualenv formencode==2.1.0 # via @@ -77,7 +77,7 @@ html5lib==1.1 # -r requirements.in # pypeline # textile -identify==2.5.35 +identify==2.6.0 # via pre-commit idna==3.7 # via requests @@ -110,7 +110,7 @@ ming==0.13.0 # via -r requirements.in mock==5.1.0 # via -r requirements.in -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit oauthlib==3.2.2 # via @@ -136,11 +136,11 @@ pastescript==3.6.0 # via -r requirements.in pillow==10.4.0 # via -r requirements.in -platformdirs==4.2.0 +platformdirs==4.2.2 # via virtualenv pluggy==1.5.0 # via pytest -pre-commit==3.7.0 ; python_version >= "3.9" +pre-commit==3.7.1 ; python_version >= "3.9" # via -r requirements.in profanityfilter==2.0.6 # via -r requirements.in @@ -244,7 +244,7 @@ typing-extensions==4.9.0 # qrcode urllib3==2.2.2 # via requests -virtualenv==20.25.3 +virtualenv==20.26.3 # via pre-commit waitress==2.1.2 # via webtest
(allura) 03/12: [#8567] Upgrade emoji 2.11.0 -> 2.12.1
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 2eed126cbfc0cc33f4cde734c0fea7ca25867d1f Author: Guillermo Cruz AuthorDate: Fri Jul 19 20:04:27 2024 + [#8567] Upgrade emoji 2.11.0 -> 2.12.1 --- requirements.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2e2238270..22736a916 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ docutils==0.20.1 # pypeline easywidgets==0.4.2 # via -r requirements.in -emoji==2.11.0 +emoji==2.12.1 # via -r requirements.in execnet==2.0.2 # via pytest-xdist @@ -239,7 +239,9 @@ translationstring==1.4 turbogears2==2.4.3 # via -r requirements.in typing-extensions==4.9.0 -# via qrcode +# via +# emoji +# qrcode urllib3==2.2.2 # via requests virtualenv==20.25.3
(allura) 05/12: [#8567] Upgrade pillow 10.3.0 -> 10.4.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit fdf5e5c7e3496cecb69c4b45ccc66ca05b6058fb Author: Guillermo Cruz AuthorDate: Mon Jul 22 16:54:21 2024 + [#8567] Upgrade pillow 10.3.0 -> 10.4.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fd7e17e00..c0a8fa7e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -134,7 +134,7 @@ pastedeploy==3.1.0 # pastescript pastescript==3.6.0 # via -r requirements.in -pillow==10.3.0 +pillow==10.4.0 # via -r requirements.in platformdirs==4.2.0 # via virtualenv
(allura) 06/12: [#8567] Upgrade Pygments 2.17.2 -> 2.18.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 57cc7c4c46ee18bb74c9b2b1e18168e5d7f977bc Author: Guillermo Cruz AuthorDate: Mon Jul 22 17:02:23 2024 + [#8567] Upgrade Pygments 2.17.2 -> 2.18.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c0a8fa7e6..57e1e56e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -146,7 +146,7 @@ profanityfilter==2.0.6 # via -r requirements.in pycparser==2.22 # via cffi -pygments==2.17.2 +pygments==2.18.0 # via -r requirements.in pymongo==3.13.0 # via
(allura) 01/12: [#8567] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 712cbb0735739ff53ce9797f5a3f270fdd55ec22 Author: Guillermo Cruz AuthorDate: Fri Jul 19 18:50:42 2024 + [#8567] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo ActivityStream0.4.2 -> no upgrade pymongo 3.13.0 -> no upgrade (OUTDATED! latest is: 4.8.0) --- requirements.txt | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index be44e8c04..fa1b2e8c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,9 +17,7 @@ beautifulsoup4==4.12.3 # -r requirements.in # webtest bleach[css]==6.1.0 -# via -# bleach -# pypeline +# via pypeline certifi==2024.7.4 # via requests cffi==1.16.0 @@ -142,9 +140,8 @@ platformdirs==4.2.0 # via virtualenv pluggy==1.4.0 # via pytest -pre-commit==3.5.0 ; python_version < "3.9" -# via -r requirements.in pre-commit==3.7.0 ; python_version >= "3.9" +# via -r requirements.in profanityfilter==2.0.6 # via -r requirements.in pycparser==2.22
(allura) 09/12: [#8567] Upgrade testfixtures 8.1.0 -> 8.3.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 77156fe461b05d806db10b06e8d8b6fbd56223f0 Author: Guillermo Cruz AuthorDate: Mon Jul 22 17:52:30 2024 + [#8567] Upgrade testfixtures 8.1.0 -> 8.3.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2cb31399f..94871828f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -226,7 +226,7 @@ sxsdiff==0.3.0 # via -r requirements.in termcolor==2.4.0 # via pytest-sugar -testfixtures==8.1.0 +testfixtures==8.3.0 # via -r requirements.in textile==4.0.2 # via pypeline
(allura) 08/12: [#8567] Upgrade ruff 0.3.7 -> 0.5.4 (OUTDATED! latest is: 0.5.3)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit be2383141a86fe024be0d32eaff9523646fa1a77 Author: Guillermo Cruz AuthorDate: Mon Jul 22 17:34:13 2024 + [#8567] Upgrade ruff 0.3.7 -> 0.5.4 (OUTDATED! latest is: 0.5.3) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8d64481ff..2cb31399f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -201,7 +201,7 @@ requests==2.32.3 # requests-oauthlib requests-oauthlib==2.0.0 # via -r requirements.in -ruff==0.3.7 +ruff==0.5.4 # via -r requirements.in setproctitle==1.3.3 # via -r requirements.in
(allura) 04/12: [#8567] Upgrade PasteScript 3.5.1 -> 3.6.0, and its deps: Paste,setuptools,PasteDeploy,setuptools
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 4bbfdc914a90f2482fdd0624e8d467161155d859 Author: Guillermo Cruz AuthorDate: Fri Jul 19 20:38:38 2024 + [#8567] Upgrade PasteScript 3.5.1 -> 3.6.0, and its deps: Paste,setuptools,PasteDeploy,setuptools PasteScript 3.5.1 -> 3.6.0 Paste 3.9.0 -> 3.10.1 setuptools 70.3.0 -> skipped PasteDeploy 3.1.0 -> no upgrade setuptools 70.3.0 -> skipped --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 22736a916..fd7e17e00 100644 --- a/requirements.txt +++ b/requirements.txt @@ -132,7 +132,7 @@ pastedeploy==3.1.0 # via # -r requirements.in # pastescript -pastescript==3.5.1 +pastescript==3.6.0 # via -r requirements.in pillow==10.3.0 # via -r requirements.in
(allura) branch gc/8567 created (now e28b7cf3e)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git at e28b7cf3e [#8567] Upgrade pre-commit 3.7.0 -> 3.7.1, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs This branch includes the following new commits: new 712cbb073 [#8567] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo new 1a31527a0 [#8567] Upgrade EasyWidgets 0.4.1 -> 0.4.2, and its deps: FormEncode,MarkupSafe,Paste,setuptools,python-dateutil,six,six,WebOb new 2eed126cb [#8567] Upgrade emoji 2.11.0 -> 2.12.1 new 4bbfdc914 [#8567] Upgrade PasteScript 3.5.1 -> 3.6.0, and its deps: Paste,setuptools,PasteDeploy,setuptools new fdf5e5c7e [#8567] Upgrade pillow 10.3.0 -> 10.4.0 new 57cc7c4c4 [#8567] Upgrade Pygments 2.17.2 -> 2.18.0 new 33d535d91 [#8567] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,regex,docutils new be2383141 [#8567] Upgrade ruff 0.3.7 -> 0.5.4 (OUTDATED! latest is: 0.5.3) new 77156fe46 [#8567] Upgrade testfixtures 8.1.0 -> 8.3.0 new fd4f0183a [#8567] Upgrade pytest 8.1.1 -> 8.3.1 (OUTDATED! latest is: 8.2.2), and its deps: iniconfig,packaging,pluggy new 3096af788 [#8567] Upgrade pytest-xdist 3.5.0 -> 3.6.1, and its deps: execnet,pytest,iniconfig,packaging,pluggy new e28b7cf3e [#8567] Upgrade pre-commit 3.7.0 -> 3.7.1, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs The 12 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) 11/12: [#8567] Upgrade pytest-xdist 3.5.0 -> 3.6.1, and its deps: execnet,pytest,iniconfig,packaging,pluggy
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 3096af788fb172b283d703b85e4877049f747d58 Author: Guillermo Cruz AuthorDate: Mon Jul 22 18:03:34 2024 + [#8567] Upgrade pytest-xdist 3.5.0 -> 3.6.1, and its deps: execnet,pytest,iniconfig,packaging,pluggy pytest-xdist 3.5.0 -> 3.6.1 execnet 2.1.1 -> no upgrade pytest8.1.1 -> 8.3.1 (OUTDATED! latest is: 8.2.2) iniconfig 2.0.0 -> no upgrade packaging 24.0 -> 24.1 pluggy1.4.0 -> 1.5.0 --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f433fd77f..eb87f29ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -50,7 +50,7 @@ easywidgets==0.4.2 # via -r requirements.in emoji==2.12.1 # via -r requirements.in -execnet==2.0.2 +execnet==2.1.1 # via pytest-xdist faust-cchardet==2.1.19 # via -r requirements.in @@ -167,7 +167,7 @@ pytest==8.3.1 # pytest-xdist pytest-sugar==1.0.0 # via -r requirements.in -pytest-xdist==3.5.0 +pytest-xdist==3.6.1 # via -r requirements.in python-dateutil==2.9.0.post0 # via
(allura) 07/12: [#8567] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,reg
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 33d535d9130e81d8dc0587702eb68899e66518f0 Author: Guillermo Cruz AuthorDate: Mon Jul 22 17:17:32 2024 + [#8567] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,regex,docutils Pypeline 0.6.1 -> no upgrade bleach6.1.0 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade html5lib1.1 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade Creoleparser 0.7.5 -> no upgrade Genshi0.7.7 -> 0.7.9 six 1.16.0 -> no upgrade six 1.16.0 -> no upgrade Markdown3.6 -> no upgrade textile 4.0.2 -> no upgrade html5lib1.1 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade regex 2024.4.16 -> 2024.5.15 docutils 0.20.1 -> no upgrade (OUTDATED! latest is: 0.21.2) --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 57e1e56e3..8d64481ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -64,7 +64,7 @@ formencode==2.1.0 # via # -r requirements.in # easywidgets -genshi==0.7.7 +genshi==0.7.9 # via creoleparser gitdb==4.0.11 # via gitpython @@ -186,7 +186,7 @@ pyyaml==6.0.1 # via pre-commit qrcode==7.4.2 # via -r requirements.in -regex==2024.4.16 +regex==2024.5.15 # via # regex-as-re-globally # textile
(allura) 02/12: [#8567] Upgrade EasyWidgets 0.4.1 -> 0.4.2, and its deps: FormEncode,MarkupSafe,Paste,setuptools,python-dateutil,six,six,WebOb
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8567 in repository https://gitbox.apache.org/repos/asf/allura.git commit 1a31527a071efbfe55b563a610e51fad22abd44a Author: Guillermo Cruz AuthorDate: Fri Jul 19 19:12:42 2024 + [#8567] Upgrade EasyWidgets 0.4.1 -> 0.4.2, and its deps: FormEncode,MarkupSafe,Paste,setuptools,python-dateutil,six,six,WebOb EasyWidgets 0.4.1 -> 0.4.2 FormEncode2.1.0 -> no upgrade MarkupSafe2.1.5 -> no upgrade Paste 3.9.0 -> 3.10.1 setuptools 70.3.0 -> skipped python-dateutil 2.9.0.post0 -> 2.9.0. six 1.16.0 -> no upgrade six 1.16.0 -> no upgrade WebOb 1.8.7 -> no upgrade --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index fa1b2e8c4..2e2238270 100644 --- a/requirements.txt +++ b/requirements.txt @@ -46,7 +46,7 @@ docutils==0.20.1 # via # -r requirements.in # pypeline -easywidgets==0.4.1 +easywidgets==0.4.2 # via -r requirements.in emoji==2.11.0 # via -r requirements.in @@ -123,7 +123,7 @@ packaging==24.0 # pytest-sugar paginate==0.5.6 # via -r requirements.in -paste==3.9.0 +paste==3.10.1 # via # -r requirements.in # easywidgets
(allura) branch master updated: bump certifi 2024.2.2 -> 2024.7.4
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 8819607a0 bump certifi 2024.2.2 -> 2024.7.4 8819607a0 is described below commit 8819607a0e59c2ba2c9e23104023c94d6d51b72c Author: Guillermo Cruz AuthorDate: Mon Jul 8 15:54:16 2024 + bump certifi 2024.2.2 -> 2024.7.4 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3025a8a43..be44e8c04 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ bleach[css]==6.1.0 # via # bleach # pypeline -certifi==2024.2.2 +certifi==2024.7.4 # via requests cffi==1.16.0 # via cryptography
(allura) branch master updated: skip per-user and per-nbhd limit checks when creating a user project
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 1dea36f13 skip per-user and per-nbhd limit checks when creating a user project 1dea36f13 is described below commit 1dea36f1360a8ff8277bbdec3e85320db2931014 Author: Dave Brondsema AuthorDate: Fri Jul 5 14:07:32 2024 -0400 skip per-user and per-nbhd limit checks when creating a user project --- Allura/allura/lib/plugin.py | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py index 5f3add94c..0dea14d29 100644 --- a/Allura/allura/lib/plugin.py +++ b/Allura/allura/lib/plugin.py @@ -1008,22 +1008,24 @@ class ProjectRegistrationProvider: "You can't create private projects in the %s neighborhood" % neighborhood.name) -# Check for project limit creation -nb_max_projects = neighborhood.get_max_projects() -if nb_max_projects is not None: -count = M.Project.query.find(dict( -neighborhood_id=neighborhood._id, -deleted=False, -is_nbhd_project=False, -)).count() -if count >= nb_max_projects: -log.exception('Error registering project %s' % project_name) -raise forge_exc.ProjectOverlimitError() - -self.rate_limit(user, neighborhood) - -if not self.phone_verified(user, neighborhood) and not user_project: -raise forge_exc.ProjectPhoneVerificationError() +if not user_project: # user-projects should not be subject to these limits + +# Check for project limit creation +nb_max_projects = neighborhood.get_max_projects() +if nb_max_projects is not None: +count = M.Project.query.find(dict( +neighborhood_id=neighborhood._id, +deleted=False, +is_nbhd_project=False, +)).count() +if count >= nb_max_projects: +log.exception('Error registering project %s' % project_name) +raise forge_exc.ProjectOverlimitError() + +self.rate_limit(user, neighborhood) + +if not self.phone_verified(user, neighborhood): +raise forge_exc.ProjectPhoneVerificationError() if user_project and shortname.startswith('u/'): check_shortname = shortname.replace('u/', '', 1)
(allura) branch master updated: bump requests 2.32.1 -> 2.32.3
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 6cf8f97cb bump requests 2.32.1 -> 2.32.3 6cf8f97cb is described below commit 6cf8f97cb6977dd2c9fb07203f8df50c1706bdc0 Author: Guillermo Cruz AuthorDate: Mon Jul 1 15:06:21 2024 + bump requests 2.32.1 -> 2.32.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fb7da978a..3025a8a43 100644 --- a/requirements.txt +++ b/requirements.txt @@ -197,7 +197,7 @@ regex-as-re-globally==0.0.3 # via -r requirements.in repoze-lru==0.7 # via turbogears2 -requests==2.32.1 +requests==2.32.3 # via # -r requirements.in # pysolr
(allura) branch master updated: bump cryptography 42.0.5 -> 42.0.8
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new e25f0f44c bump cryptography 42.0.5 -> 42.0.8 e25f0f44c is described below commit e25f0f44ce49d51f7d7036935fbbf1e7c8a152f7 Author: Guillermo Cruz AuthorDate: Mon Jul 1 14:44:59 2024 + bump cryptography 42.0.5 -> 42.0.8 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 57afd7c18..fb7da978a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ crank==0.8.1 # via turbogears2 creoleparser==0.7.5 # via pypeline -cryptography==42.0.5 +cryptography==42.0.8 # via # -r requirements.in # joserfc
(allura) branch master updated: bump urllib3 2.2.1 -> 2.2.2
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 451809649 bump urllib3 2.2.1 -> 2.2.2 451809649 is described below commit 451809649899a5a6d64c44fb159bceacffdc6da0 Author: Guillermo Cruz AuthorDate: Tue Jun 18 15:01:17 2024 + bump urllib3 2.2.1 -> 2.2.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2018c56a0..57afd7c18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -243,7 +243,7 @@ turbogears2==2.4.3 # via -r requirements.in typing-extensions==4.9.0 # via qrcode -urllib3==2.2.1 +urllib3==2.2.2 # via requests virtualenv==20.25.3 # via pre-commit
(allura) 03/03: [#7272] do not permit tokens in URL for oauth2
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit f6c97a8f2507a93ed74eb24c53a1458f056a08d6 Author: Dave Brondsema AuthorDate: Wed May 29 15:46:21 2024 -0400 [#7272] do not permit tokens in URL for oauth2 --- Allura/allura/controllers/rest.py | 3 +++ Allura/allura/tests/functional/test_rest.py | 3 +++ Allura/docs/api-rest/docs.md| 17 - Allura/docs/api-rest/securitySchemes.yaml | 4 ++-- Allura/docs/api-rest/traits.yaml| 3 --- scripts/new_ticket.py | 3 +-- scripts/project_export | 6 +++--- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py index 9cb8ca180..b42605eca 100644 --- a/Allura/allura/controllers/rest.py +++ b/Allura/allura/controllers/rest.py @@ -80,6 +80,9 @@ class RestController: if not self._is_oauth2_enabled(): raise +if params_auth: +raise exc.HTTPUnauthorized('Do not use tokens in URL, instead use header Authorization: Bearer $TOKEN') + access_token = self.oauth2._authenticate() if not access_token: raise diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py index d3b896b8e..21d260254 100644 --- a/Allura/allura/tests/functional/test_rest.py +++ b/Allura/allura/tests/functional/test_rest.py @@ -443,6 +443,9 @@ class TestRestHome(TestRestApiBase): r = self.api_post('/rest/p/test/wiki/Home', params=params) assert r.status_int == 200 +r = self.app.get('/rest/p/test/wiki/Home', params={'access_token': token.access_token}, status=401) +assert b'Do not use tokens in URL' in r.body + @td.with_wiki @mock.patch.dict(config, {'auth.oauth2.enabled': True}) def test_oauth2_expired_token_authentication(self): diff --git a/Allura/docs/api-rest/docs.md b/Allura/docs/api-rest/docs.md index 35db1ae64..dfd25c1db 100755 --- a/Allura/docs/api-rest/docs.md +++ b/Allura/docs/api-rest/docs.md @@ -41,20 +41,18 @@ The following tools have API support: In order to use the API for authenticated actions, you should use the OAuth account page to create a consumer key for your application. Once you have a consumer key, you must have a site user (e.g. your own account, if you're writing a single script) authorize your application to act on his or her behalf. -You can also use your normal browser session as authentication for the API. This is useful for manually testing API calls or for in-browser applications (such as extensions or user-scripts). It is not recommended for programatic access, however, as it would require you to store your account username and password, and thus cannot be easily managed or revoked. +You can also use your normal browser session as authentication for the API. This is useful for manually testing API calls or for in-browser applications (such as extensions or user-scripts). It is not recommended for programmatic access, however, as it would require you to store your account username and password, and thus cannot be easily managed or revoked. Without authentication, all API requests have the permissions of an anonymous visitor. To view or change anything that requires a login, you must authenticate to the API using OAuth. You must first register for an OAuth consumer token at <https://forge-allura.apache.org/auth/oauth/>. Once you have registered, you will be be able to see your consumer key and consumer secret, or generate a bearer token, at <https://forge-allura.apache.org/auth/oauth/>. ### OAuth With Bearer Tokens -The easiest way to use the API with your own account is to use a bearer token. Once you have generated a bearer token at <https://forge-allura.apache.org.net/auth/oauth/>, you just include it in the request to the API via the `access_token` URL parameter, `access_token` POST form field, or http header like `Authorization: Bearer MY_BEARER_TOKEN`. - -Note, however, that to use bearer tokens, you *must* use HTTPS/SSL for the request. +The easiest way to use the API with your own account is to use a bearer token. Once you have generated a bearer token at <https://forge-allura.apache.org.net/auth/oauth/>, you just include it in the request to the API via a http header like `Authorization: Bearer MY_BEARER_TOKEN`. Simple URL example to access a private ticket: -https://forge-allura.apache.org/rest/p/allura/tickets/35/?access_token=MY_BEARER_TOKEN +curl -H 'Authorization: Bearer MY_BEARER_TOKEN' https://forge-allura.apache.org/rest/p/allura/tickets/35/ Python code example to creat
(allura) branch master updated (7321fb9b6 -> f6c97a8f2)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 7321fb9b6 fix username hover on ticket search results new ca980de86 [#7272] do not allow http: redirect urls new 36b22194a [#7272] better repr for if/when oauthlib DEBUG logging is enabled new f6c97a8f2 [#7272] do not permit tokens in URL for oauth2 The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/controllers/rest.py | 10 ++ Allura/allura/lib/validators.py | 10 ++ Allura/allura/lib/widgets/oauth_widgets.py | 18 -- Allura/allura/model/oauth.py| 6 ++ Allura/allura/tests/functional/test_rest.py | 3 +++ Allura/docs/api-rest/docs.md| 17 - Allura/docs/api-rest/securitySchemes.yaml | 4 ++-- Allura/docs/api-rest/traits.yaml| 3 --- scripts/new_ticket.py | 3 +-- scripts/project_export | 6 +++--- 10 files changed, 55 insertions(+), 25 deletions(-)
(allura) 01/03: [#7272] do not allow http: redirect urls
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit ca980de86cab8fdd08817156dd00505c635db49d Author: Dave Brondsema AuthorDate: Wed May 29 14:40:07 2024 -0400 [#7272] do not allow http: redirect urls --- Allura/allura/controllers/rest.py | 2 ++ Allura/allura/lib/validators.py| 10 ++ Allura/allura/lib/widgets/oauth_widgets.py | 18 -- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py index bfa95a4bf..ec1a3266f 100644 --- a/Allura/allura/controllers/rest.py +++ b/Allura/allura/controllers/rest.py @@ -259,6 +259,8 @@ class Oauth2Validator(oauthlib.oauth2.RequestValidator): return M.OAuth2ClientApp.query.get(client_id=client_id) is not None def validate_redirect_uri(self, client_id, redirect_uri, request, *args, **kwargs): +if redirect_uri.startswith('http:'): +return False client = M.OAuth2ClientApp.query.get(client_id=client_id) return redirect_uri in client.redirect_uris diff --git a/Allura/allura/lib/validators.py b/Allura/allura/lib/validators.py index 2f2776b39..8d6556c24 100644 --- a/Allura/allura/lib/validators.py +++ b/Allura/allura/lib/validators.py @@ -84,6 +84,16 @@ class NonHttpUrl(URL): ''', re.I | re.VERBOSE) +class HttpsUrl(URL): +add_http = False + +def _convert_to_python(self, value, state): +value = super()._convert_to_python(value, state) +if not value.startswith('https://'): +raise fev.Invalid("Must be https://";, value, state) +return value + + class UnicodeString(fev.UnicodeString): """ Override UnicodeString to fix bytes handling. diff --git a/Allura/allura/lib/widgets/oauth_widgets.py b/Allura/allura/lib/widgets/oauth_widgets.py index 5c7105c1f..ba314c3d0 100644 --- a/Allura/allura/lib/widgets/oauth_widgets.py +++ b/Allura/allura/lib/widgets/oauth_widgets.py @@ -63,17 +63,23 @@ class OAuth2ApplicationForm(ForgeForm): # SortableRepeatedField would be nice to use (and ignore sorting) so you can add many dynamically, # but couldn't get it to work easily + +# use HttpsUrl so unencrypted http is prevented and tokens can't be intercepted +# in theory could allow some other protocols (but not http:) so it can work with mobile apps etc redirect_url_1 = ew.TextField( label='Redirect URL(s)', -validator=fev.URL(not_empty=True), -attrs=dict(type='url', style='min-width:25em', required=True), +validator=V.HttpsUrl(not_empty=True), +attrs=dict(type='url', style='min-width:25em', required=True, placeholder='https://...', + pattern='https://.*', title='must start with https://'), ) redirect_url_2 = ew.TextField( -validator=fev.URL(), -attrs=dict(type='url', style='min-width:25em; margin-left: 162px;'), # match grid-4 label width +validator=V.HttpsUrl(), +attrs=dict(type='url', style='min-width:25em; margin-left: 162px;', # match grid-4 label width + pattern='https://.*', title='must start with https://'), ) redirect_url_3 = ew.TextField( -validator=fev.URL(), -attrs=dict(type='url', style='min-width:25em; margin-left: 162px;'), # match grid-4 label width +validator=V.HttpsUrl(), +attrs=dict(type='url', style='min-width:25em; margin-left: 162px;', # match grid-4 label width + pattern='https://.*', title='must start with https://'), )
(allura) 02/03: [#7272] better repr for if/when oauthlib DEBUG logging is enabled
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 36b22194aab858f0e9cbefe18483f2b2346299cc Author: Dave Brondsema AuthorDate: Wed May 29 14:46:35 2024 -0400 [#7272] better repr for if/when oauthlib DEBUG logging is enabled --- Allura/allura/controllers/rest.py | 5 + Allura/allura/model/oauth.py | 6 ++ 2 files changed, 11 insertions(+) diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py index ec1a3266f..9cb8ca180 100644 --- a/Allura/allura/controllers/rest.py +++ b/Allura/allura/controllers/rest.py @@ -255,6 +255,11 @@ class Oauth1Validator(oauthlib.oauth1.RequestValidator): class Oauth2Validator(oauthlib.oauth2.RequestValidator): +def __init__(self): +super().__init__() +if asbool(tg.config.get('debug')): +oauthlib.set_debug(True) + def validate_client_id(self, client_id: str, request: oauthlib.common.Request, *args, **kwargs) -> bool: return M.OAuth2ClientApp.query.get(client_id=client_id) is not None diff --git a/Allura/allura/model/oauth.py b/Allura/allura/model/oauth.py index 69043635a..d70b5baaa 100644 --- a/Allura/allura/model/oauth.py +++ b/Allura/allura/model/oauth.py @@ -192,6 +192,9 @@ class OAuth2ClientApp(MappedClass): def description_html(self): return g.markdown.cached_convert(self, 'description') +def __repr__(self): +return f'<{self.__class__.__name__} _id={self._id} client_id={self.client_id} {self.name}>' + class OAuth2AuthorizationCode(MappedClass): class __mongometa__: @@ -250,6 +253,9 @@ class OAuth2AccessToken(MappedClass): user = RelationProperty('User') +def __repr__(self): +return f'<{self.__class__.__name__} _id={self._id} client_id={self.client_id} user_id={self.user_id}>' + def dummy_oauths(): from allura.controllers.rest import Oauth1Validator
(allura) branch master updated (634892b56 -> 85a8e2490)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 634892b56 fixup! [#7272] Implement additional security features for OAuth2 support add 85a8e2490 code cleanup using autopep8 No new revisions were added by this update. Summary of changes: Allura/allura/app.py | 3 ++- Allura/allura/command/script.py| 4 ++-- Allura/allura/command/taskd.py | 4 ++-- Allura/allura/config/app_cfg.py| 1 + Allura/allura/controllers/auth.py | 6 ++--- Allura/allura/controllers/repository.py| 2 +- Allura/allura/controllers/rest.py | 16 ++--- Allura/allura/controllers/site_admin.py| 4 ++-- Allura/allura/controllers/task.py | 1 - Allura/allura/eventslistener.py| 1 + Allura/allura/ext/admin/widgets.py | 4 ++-- Allura/allura/lib/app_globals.py | 7 +++--- Allura/allura/lib/custom_middleware.py | 12 ++ Allura/allura/lib/helpers.py | 3 ++- Allura/allura/lib/macro.py | 6 ++--- Allura/allura/lib/mail_util.py | 2 ++ Allura/allura/lib/package_path_loader.py | 4 ++-- Allura/allura/lib/phone/nexmo.py | 2 +- Allura/allura/lib/plugin.py| 2 ++ Allura/allura/lib/repository.py| 4 ++-- Allura/allura/lib/search.py| 10 Allura/allura/lib/security.py | 7 -- Allura/allura/lib/utils.py | 8 +++ Allura/allura/lib/validators.py| 7 +++--- Allura/allura/lib/widgets/discuss.py | 20 Allura/allura/lib/widgets/forms.py | 28 +++--- Allura/allura/lib/widgets/user_profile.py | 6 ++--- Allura/allura/model/filesystem.py | 4 ++-- Allura/allura/model/oauth.py | 3 +-- Allura/allura/model/project.py | 5 ++-- Allura/allura/model/repository.py | 2 +- Allura/allura/model/stats.py | 4 ++-- Allura/allura/model/types.py | 1 + Allura/allura/scripts/create_sitemap_files.py | 4 ++-- Allura/allura/scripts/disable_users.py | 1 + Allura/allura/scripts/scripttask.py| 2 -- Allura/allura/tasks/index_tasks.py | 2 ++ Allura/allura/tasks/notification_tasks.py | 2 ++ Allura/allura/tasks/repo_tasks.py | 3 +-- Allura/allura/tests/functional/test_auth.py| 11 - Allura/allura/tests/functional/test_discuss.py | 5 Allura/allura/tests/functional/test_gravatar.py| 4 ++-- .../allura/tests/functional/test_neighborhood.py | 2 +- Allura/allura/tests/functional/test_rest.py| 8 +++ Allura/allura/tests/functional/test_site_admin.py | 6 ++--- .../allura/tests/functional/test_trovecategory.py | 4 ++-- Allura/allura/tests/model/test_neighborhood.py | 8 +++ Allura/allura/tests/model/test_notification.py | 10 Allura/allura/tests/model/test_project.py | 4 ++-- Allura/allura/tests/model/test_repo.py | 6 ++--- Allura/allura/tests/model/test_timeline.py | 2 +- Allura/allura/tests/test_app.py| 5 ++-- Allura/allura/tests/test_commands.py | 3 ++- Allura/allura/tests/test_helpers.py| 1 + Allura/allura/tests/test_mail_util.py | 10 Allura/allura/tests/test_middlewares.py| 14 +-- Allura/allura/tests/test_security.py | 4 ++-- Allura/allura/tests/test_webhooks.py | 12 +- .../allura/tests/unit/test_ldap_auth_provider.py | 4 ++-- Allura/allura/tests/unit/test_project.py | 2 +- Allura/allura/webhooks.py | 6 ++--- AlluraTest/alluratest/controller.py| 6 ++--- .../forgeactivity/tests/functional/test_rest.py| 3 +-- ForgeBlog/forgeblog/tests/functional/test_feeds.py | 8 +++ ForgeBlog/forgeblog/tests/test_app.py | 8 +++ ForgeBlog/forgeblog/tests/test_commands.py | 3 ++- .../forgediscussion/tests/functional/test_forum.py | 8 +++ .../tests/functional/test_forum_admin.py | 3 +-- .../tests/functional/test_import.py| 6 ++--- ForgeGit/forgegit/model/git_repo.py| 7 +++--- .../forgegit/tests/functional/test_controllers.py | 2 +- ForgeGit/forgegit/tests/model/test_repository.py | 8 +++ ForgeImporters/forgeimporters/base.py | 4 ++-- ForgeImporters/forgeimporters
(allura) 01/01: code cleanup using autopep8
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch pep8-cleanup in repository https://gitbox.apache.org/repos/asf/allura.git commit 85a8e249059d67b4a5b7573f6ae679de5aa26d66 Author: Guillermo Cruz AuthorDate: Mon May 13 14:53:15 2024 -0600 code cleanup using autopep8 --- Allura/allura/app.py | 3 ++- Allura/allura/command/script.py| 4 ++-- Allura/allura/command/taskd.py | 4 ++-- Allura/allura/config/app_cfg.py| 1 + Allura/allura/controllers/auth.py | 6 ++--- Allura/allura/controllers/repository.py| 2 +- Allura/allura/controllers/rest.py | 16 ++--- Allura/allura/controllers/site_admin.py| 4 ++-- Allura/allura/controllers/task.py | 1 - Allura/allura/eventslistener.py| 1 + Allura/allura/ext/admin/widgets.py | 4 ++-- Allura/allura/lib/app_globals.py | 7 +++--- Allura/allura/lib/custom_middleware.py | 12 ++ Allura/allura/lib/helpers.py | 3 ++- Allura/allura/lib/macro.py | 6 ++--- Allura/allura/lib/mail_util.py | 2 ++ Allura/allura/lib/package_path_loader.py | 4 ++-- Allura/allura/lib/phone/nexmo.py | 2 +- Allura/allura/lib/plugin.py| 2 ++ Allura/allura/lib/repository.py| 4 ++-- Allura/allura/lib/search.py| 10 Allura/allura/lib/security.py | 7 -- Allura/allura/lib/utils.py | 8 +++ Allura/allura/lib/validators.py| 7 +++--- Allura/allura/lib/widgets/discuss.py | 20 Allura/allura/lib/widgets/forms.py | 28 +++--- Allura/allura/lib/widgets/user_profile.py | 6 ++--- Allura/allura/model/filesystem.py | 4 ++-- Allura/allura/model/oauth.py | 3 +-- Allura/allura/model/project.py | 5 ++-- Allura/allura/model/repository.py | 2 +- Allura/allura/model/stats.py | 4 ++-- Allura/allura/model/types.py | 1 + Allura/allura/scripts/create_sitemap_files.py | 4 ++-- Allura/allura/scripts/disable_users.py | 1 + Allura/allura/scripts/scripttask.py| 2 -- Allura/allura/tasks/index_tasks.py | 2 ++ Allura/allura/tasks/notification_tasks.py | 2 ++ Allura/allura/tasks/repo_tasks.py | 3 +-- Allura/allura/tests/functional/test_auth.py| 11 - Allura/allura/tests/functional/test_discuss.py | 5 Allura/allura/tests/functional/test_gravatar.py| 4 ++-- .../allura/tests/functional/test_neighborhood.py | 2 +- Allura/allura/tests/functional/test_rest.py| 8 +++ Allura/allura/tests/functional/test_site_admin.py | 6 ++--- .../allura/tests/functional/test_trovecategory.py | 4 ++-- Allura/allura/tests/model/test_neighborhood.py | 8 +++ Allura/allura/tests/model/test_notification.py | 10 Allura/allura/tests/model/test_project.py | 4 ++-- Allura/allura/tests/model/test_repo.py | 6 ++--- Allura/allura/tests/model/test_timeline.py | 2 +- Allura/allura/tests/test_app.py| 5 ++-- Allura/allura/tests/test_commands.py | 3 ++- Allura/allura/tests/test_helpers.py| 1 + Allura/allura/tests/test_mail_util.py | 10 Allura/allura/tests/test_middlewares.py| 14 +-- Allura/allura/tests/test_security.py | 4 ++-- Allura/allura/tests/test_webhooks.py | 12 +- .../allura/tests/unit/test_ldap_auth_provider.py | 4 ++-- Allura/allura/tests/unit/test_project.py | 2 +- Allura/allura/webhooks.py | 6 ++--- AlluraTest/alluratest/controller.py| 6 ++--- .../forgeactivity/tests/functional/test_rest.py| 3 +-- ForgeBlog/forgeblog/tests/functional/test_feeds.py | 8 +++ ForgeBlog/forgeblog/tests/test_app.py | 8 +++ ForgeBlog/forgeblog/tests/test_commands.py | 3 ++- .../forgediscussion/tests/functional/test_forum.py | 8 +++ .../tests/functional/test_forum_admin.py | 3 +-- .../tests/functional/test_import.py| 6 ++--- ForgeGit/forgegit/model/git_repo.py| 7 +++--- .../forgegit/tests/functional/test_controllers.py | 2 +- ForgeGit/forgegit/tests/model/test_repository.py | 8 +++ ForgeImporters/forgeimporters/base.py | 4 ++-- ForgeImporters/forgeimporters/github/__init__.py | 4 +++- .../forgeimporters
(allura) branch pep8-cleanup updated (ef99992cd -> 85a8e2490)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch pep8-cleanup in repository https://gitbox.apache.org/repos/asf/allura.git discard ef2cd code cleanup using autopep8 new 85a8e2490 code cleanup using autopep8 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (ef2cd) \ N -- N -- N refs/heads/pep8-cleanup (85a8e2490) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/config/middleware.py | 32 1 file changed, 16 insertions(+), 16 deletions(-)
(allura) branch pep8-cleanup created (now ef99992cd)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch pep8-cleanup in repository https://gitbox.apache.org/repos/asf/allura.git at ef2cd code cleanup using autopep8 This branch includes the following new commits: new ef2cd code cleanup using autopep8 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) 01/01: code cleanup using autopep8
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch pep8-cleanup in repository https://gitbox.apache.org/repos/asf/allura.git commit ef2cdd8de771da03e14e432b6bb0a7e59d43 Author: Guillermo Cruz AuthorDate: Mon May 13 14:14:26 2024 -0600 code cleanup using autopep8 --- Allura/allura/app.py | 3 +- Allura/allura/command/script.py| 4 +-- Allura/allura/command/taskd.py | 4 +-- Allura/allura/config/app_cfg.py| 1 + Allura/allura/config/middleware.py | 32 +++--- Allura/allura/controllers/auth.py | 6 ++-- Allura/allura/controllers/repository.py| 2 +- Allura/allura/controllers/rest.py | 16 +-- Allura/allura/controllers/site_admin.py| 4 +-- Allura/allura/controllers/task.py | 1 - Allura/allura/eventslistener.py| 1 + Allura/allura/ext/admin/widgets.py | 4 +-- Allura/allura/lib/app_globals.py | 7 +++-- Allura/allura/lib/custom_middleware.py | 12 +--- Allura/allura/lib/helpers.py | 3 +- Allura/allura/lib/macro.py | 6 ++-- Allura/allura/lib/mail_util.py | 2 ++ Allura/allura/lib/package_path_loader.py | 4 +-- Allura/allura/lib/phone/nexmo.py | 2 +- Allura/allura/lib/plugin.py| 2 ++ Allura/allura/lib/repository.py| 4 +-- Allura/allura/lib/search.py| 10 +++ Allura/allura/lib/security.py | 7 +++-- Allura/allura/lib/utils.py | 8 +++--- Allura/allura/lib/validators.py| 7 +++-- Allura/allura/lib/widgets/discuss.py | 20 +++--- Allura/allura/lib/widgets/forms.py | 28 +-- Allura/allura/lib/widgets/user_profile.py | 6 ++-- Allura/allura/model/filesystem.py | 4 +-- Allura/allura/model/oauth.py | 3 +- Allura/allura/model/project.py | 5 ++-- Allura/allura/model/repository.py | 2 +- Allura/allura/model/stats.py | 4 +-- Allura/allura/model/types.py | 1 + Allura/allura/scripts/create_sitemap_files.py | 4 +-- Allura/allura/scripts/disable_users.py | 1 + Allura/allura/scripts/scripttask.py| 2 -- Allura/allura/tasks/index_tasks.py | 2 ++ Allura/allura/tasks/notification_tasks.py | 2 ++ Allura/allura/tasks/repo_tasks.py | 3 +- Allura/allura/tests/functional/test_auth.py| 11 Allura/allura/tests/functional/test_discuss.py | 5 Allura/allura/tests/functional/test_gravatar.py| 4 +-- .../allura/tests/functional/test_neighborhood.py | 2 +- Allura/allura/tests/functional/test_rest.py| 8 +++--- Allura/allura/tests/functional/test_site_admin.py | 6 ++-- .../allura/tests/functional/test_trovecategory.py | 4 +-- Allura/allura/tests/model/test_neighborhood.py | 8 +++--- Allura/allura/tests/model/test_notification.py | 10 +++ Allura/allura/tests/model/test_project.py | 4 +-- Allura/allura/tests/model/test_repo.py | 6 ++-- Allura/allura/tests/model/test_timeline.py | 2 +- Allura/allura/tests/test_app.py| 5 ++-- Allura/allura/tests/test_commands.py | 3 +- Allura/allura/tests/test_helpers.py| 1 + Allura/allura/tests/test_mail_util.py | 10 +++ Allura/allura/tests/test_middlewares.py| 14 +- Allura/allura/tests/test_security.py | 4 +-- Allura/allura/tests/test_webhooks.py | 12 .../allura/tests/unit/test_ldap_auth_provider.py | 4 +-- Allura/allura/tests/unit/test_project.py | 2 +- Allura/allura/webhooks.py | 6 ++-- AlluraTest/alluratest/controller.py| 6 ++-- .../forgeactivity/tests/functional/test_rest.py| 3 +- ForgeBlog/forgeblog/tests/functional/test_feeds.py | 8 +++--- ForgeBlog/forgeblog/tests/test_app.py | 8 +++--- ForgeBlog/forgeblog/tests/test_commands.py | 3 +- .../forgediscussion/tests/functional/test_forum.py | 8 ++ .../tests/functional/test_forum_admin.py | 3 +- .../tests/functional/test_import.py| 6 ++-- ForgeGit/forgegit/model/git_repo.py| 7 +++-- .../forgegit/tests/functional/test_controllers.py | 2 +- ForgeGit/forgegit/tests/model/test_repository.py | 8 +++--- ForgeImporters/forgeimporters/base.py | 4 +-- ForgeImporters/forgeimporters/github/__init__.py | 4
(allura) 01/01: [#8558] make sure all user prefs changes get indexed by solr
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8558 in repository https://gitbox.apache.org/repos/asf/allura.git commit 8cb617ce7bf07e97b3cc753d7745783d1742fe6c Author: Guillermo Cruz AuthorDate: Thu May 9 14:33:08 2024 -0600 [#8558] make sure all user prefs changes get indexed by solr --- Allura/allura/controllers/auth.py | 2 +- Allura/allura/model/auth.py | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py index 3f3f82fdb..555ac4d95 100644 --- a/Allura/allura/controllers/auth.py +++ b/Allura/allura/controllers/auth.py @@ -623,7 +623,7 @@ class PreferencesController(BaseController): flash('You must provide your current password to delete an email', 'error') return if primary_addr == user.email_addresses[i]: -if select_new_primary_addr(user, ignore_emails=primary_addr) is None \ +if select_new_primary_addr(user, ignore_emails=[primary_addr]) is None \ and asbool(config.get('auth.require_email_addr', False)): flash('You must have at least one verified email address.', 'error') return diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py index 74652226a..0b73f1b34 100644 --- a/Allura/allura/model/auth.py +++ b/Allura/allura/model/auth.py @@ -865,6 +865,11 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable): p = plugin.AuthenticationProvider.get(request) return p.user_registration_date(self) +# overriding since the old and new values are not being tracked for changes within a dictionary like preferences +# This will ensure any changes get indexed by solr. +def should_update_index(self, old_doc, new_doc): +return True + class ProjectRole(MappedClass): """
(allura) branch gc/8558 created (now 8cb617ce7)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch gc/8558 in repository https://gitbox.apache.org/repos/asf/allura.git at 8cb617ce7 [#8558] make sure all user prefs changes get indexed by solr This branch includes the following new commits: new 8cb617ce7 [#8558] make sure all user prefs changes get indexed by solr The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) branch master updated: bump werkzeug 3.0.2 -> 3.0.3
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 7a30aafbb bump werkzeug 3.0.2 -> 3.0.3 7a30aafbb is described below commit 7a30aafbbebabc2e5cecab65e323583d17b05bc4 Author: Guillermo Cruz AuthorDate: Tue May 7 17:02:51 2024 + bump werkzeug 3.0.2 -> 3.0.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ab2e5d944..1608075ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -265,7 +265,7 @@ webob==1.8.7 # webtest webtest==3.0.0 # via -r requirements.in -werkzeug==3.0.2 +werkzeug==3.0.3 # via -r requirements.in wrapt==1.16.0 # via -r requirements.in
(allura) branch akismet-update created (now 0628922be)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch akismet-update in repository https://gitbox.apache.org/repos/asf/allura.git at 0628922be code updates to AkismetWithoutStartupVerify This branch includes the following new commits: new 0628922be code updates to AkismetWithoutStartupVerify The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) 01/01: code updates to AkismetWithoutStartupVerify
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch akismet-update in repository https://gitbox.apache.org/repos/asf/allura.git commit 0628922bec81f44764fdeee5bc41282248f5205d Author: Guillermo Cruz AuthorDate: Wed Apr 24 10:11:26 2024 -0600 code updates to AkismetWithoutStartupVerify --- Allura/allura/lib/spam/akismetfilter.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Allura/allura/lib/spam/akismetfilter.py b/Allura/allura/lib/spam/akismetfilter.py index 1ed46ed10..c4c85d2d0 100644 --- a/Allura/allura/lib/spam/akismetfilter.py +++ b/Allura/allura/lib/spam/akismetfilter.py @@ -35,11 +35,16 @@ log = logging.getLogger(__name__) if AKISMET_AVAILABLE: -class AkismetWithoutStartupVerify(akismet.Akismet): +class AkismetWithoutStartupVerify(akismet.SyncClient): def __init__(self, key=None, blog_url=None): # avoid possible errors at instantiation time, will encounter them later self.api_key = key self.blog_url = blog_url +self._config = akismet.Config(key=key, url=blog_url) +akismet_client = akismet.SyncClient(config=self._config) +self._http_client = akismet_client._http_client +if not akismet_client.verify_key(self._config.key, self._config.url): +raise Exception('Akismet key verification failed') class AkismetSpamFilter(SpamFilter):
(allura) branch master updated: pin docutils to v0.20.1 to keep compatibility with older versions of Python
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new e83afa851 pin docutils to v0.20.1 to keep compatibility with older versions of Python e83afa851 is described below commit e83afa851ed6a2503cc5f634ec340b2218f91688 Author: Guillermo Cruz AuthorDate: Tue Apr 23 19:59:16 2024 + pin docutils to v0.20.1 to keep compatibility with older versions of Python --- requirements.in | 2 ++ requirements.txt | 9 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/requirements.in b/requirements.in index 4870618c7..a8c041986 100644 --- a/requirements.in +++ b/requirements.in @@ -56,6 +56,8 @@ WebTest pytest pytest-xdist pytest-sugar +# last version supporting Python 3.7 and 3.8. +docutils==0.20.1 # deployment gunicorn diff --git a/requirements.txt b/requirements.txt index b95eda650..3365df5c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,8 +44,10 @@ diff-match-patch==20230430 # via sxsdiff distlib==0.3.8 # via virtualenv -docutils==0.21.1 -# via pypeline +docutils==0.20.1 +# via +# -r requirements.in +# pypeline easywidgets==0.4.1 # via -r requirements.in emoji==2.11.0 @@ -140,8 +142,9 @@ platformdirs==4.2.0 # via virtualenv pluggy==1.4.0 # via pytest +pre-commit==3.5.0 ; python_version < "3.9" +# via -r requirements.in pre-commit==3.7.0 ; python_version >= "3.9" -# via -r requirements.in profanityfilter==2.0.6 # via -r requirements.in pycparser==2.22
(allura) branch master updated (60ada4f22 -> 21b6e82ee)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 60ada4f22 bump idna 3.6 -> 3.7 add 3aebac998 [#8557] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo add 2bfe922ce [#8557] Upgrade beautifulsoup4 4.12.2 -> 4.12.3, and its deps: soupsieve add 9c9d092ba [#8557] Upgrade Beaker 1.12.1 -> 1.13.0 add 43eb276be [#8557] Upgrade beaker-session-jwt 1.0.1 -> no upgrade, and its deps: Beaker,joserfc,cryptography,cffi,pycparser,pymongo add 844a4d5bb [#8557] Upgrade emoji 2.9.0 -> 2.11.0 add 8e4fde02f [#8557] Upgrade GitPython 3.1.41 -> 3.1.43, and its deps: gitdb,smmap add 094a4ad5f [#8557] Upgrade Markdown 3.5.2 -> 3.6 add 88d5be385 [#8557] Upgrade PasteScript 3.4.0 -> 3.5.1, and its deps: Paste,setuptools,six,PasteDeploy,setuptools,six add 89a6b94c1 [#8557] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,regex,docutils add 5a9200d46 [#8557] Upgrade python-dateutil 2.8.2 -> 2.9.0. (OUTDATED! latest is: 2.9.0.post0), and its deps: six add daa6b803e [#8557] Upgrade requests-oauthlib 1.3.1 -> 2.0.0, and its deps: oauthlib,requests,certifi,charset-normalizer,idna,urllib3 add 4d3ef943e [#8557] Upgrade WebHelpers2 2.0 -> 2.1, and its deps: MarkupSafe,six add c5490f43d [#8557] Upgrade werkzeug 3.0.1 -> 3.0.2, and its deps: MarkupSafe add 87663f789 [#8557] Upgrade ruff 0.3.2 -> 0.3.7 add 076b9c20d [#8557] Upgrade testfixtures 7.2.2 -> 8.1.0 add 7c6285233 [#8557] Upgrade pytest 7.4.4 -> 8.1.1, and its deps: iniconfig,packaging,pluggy add b94e1b842 [#8557] Upgrade pytest-sugar 0.9.7 -> 1.0.0, and its deps: packaging,pytest,iniconfig,packaging,pluggy,termcolor add 4052bd62e [#8557] Upgrade gunicorn 21.2.0 -> 22.0.0, and its deps: packaging add b9f668d3d [#8557] Upgrade pre-commit 3.6.0 -> 3.7.0, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs add 21b6e82ee [#8557] updated _strip_tags_re with regexp since it was removed from markupsafe package No new revisions were added by this update. Summary of changes: Allura/allura/tasks/mail_tasks.py | 2 +- requirements.txt | 68 +++ 2 files changed, 34 insertions(+), 36 deletions(-)
(allura) branch gc/8557 updated: [#8557] updated _strip_tags_re with regexp since it was removed from markupsafe package
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8557 by this push: new 21b6e82ee [#8557] updated _strip_tags_re with regexp since it was removed from markupsafe package 21b6e82ee is described below commit 21b6e82eedef311c09bf7be9f7b2d00eef0160ed Author: Guillermo Cruz AuthorDate: Thu Apr 18 12:23:41 2024 -0600 [#8557] updated _strip_tags_re with regexp since it was removed from markupsafe package --- Allura/allura/tasks/mail_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Allura/allura/tasks/mail_tasks.py b/Allura/allura/tasks/mail_tasks.py index dd16f7caa..75523b444 100644 --- a/Allura/allura/tasks/mail_tasks.py +++ b/Allura/allura/tasks/mail_tasks.py @@ -117,7 +117,7 @@ def create_multipart_msg(text, metalink=None): def replace_html(matchobj): text_within_div = matchobj.group(1) text_within_div = text_within_div.replace('', '\n') -text_within_div = markupsafe._strip_tags_re.sub('', text_within_div) +text_within_div = re.compile(r"<.*?>", re.DOTALL).sub('', text_within_div) return text_within_div plain_text = text
(allura) 19/19: [#8557] Upgrade pre-commit 3.6.0 -> 3.7.0, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit b9f668d3d45f6a88faf7191bdb56e742f6496f5b Author: Guillermo Cruz AuthorDate: Thu Apr 18 00:26:59 2024 + [#8557] Upgrade pre-commit 3.6.0 -> 3.7.0, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs pre-commit3.6.0 -> 3.7.0 cfgv 3.4.0 -> no upgrade identify 2.5.33 -> 2.5.35 nodeenv 1.8.0 -> no upgrade setuptools 69.0.3 -> skipped PyYAML6.0.1 -> no upgrade virtualenv 20.25.0 -> 20.25.3 distlib 0.3.8 -> no upgrade filelock 3.13.1 -> 3.13.4 platformdirs 4.1.0 -> 4.2.0 --- requirements.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8a92b5791..b95eda650 100644 --- a/requirements.txt +++ b/requirements.txt @@ -58,7 +58,7 @@ feedgenerator==2.1.0 # via -r requirements.in feedparser==6.0.11 # via -r requirements.in -filelock==3.13.1 +filelock==3.13.4 # via virtualenv formencode==2.1.0 # via @@ -77,7 +77,7 @@ html5lib==1.1 # -r requirements.in # pypeline # textile -identify==2.5.33 +identify==2.5.35 # via pre-commit idna==3.7 # via requests @@ -136,7 +136,7 @@ pastescript==3.5.1 # via -r requirements.in pillow==10.3.0 # via -r requirements.in -platformdirs==4.1.0 +platformdirs==4.2.0 # via virtualenv pluggy==1.4.0 # via pytest @@ -242,7 +242,7 @@ typing-extensions==4.9.0 # via qrcode urllib3==2.2.1 # via requests -virtualenv==20.25.0 +virtualenv==20.25.3 # via pre-commit waitress==2.1.2 # via webtest
(allura) 08/19: [#8557] Upgrade PasteScript 3.4.0 -> 3.5.1, and its deps: Paste,setuptools,six,PasteDeploy,setuptools,six
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 88d5be3857448ef2f1f3f69c14a7718f981bbd7c Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:27:14 2024 + [#8557] Upgrade PasteScript 3.4.0 -> 3.5.1, and its deps: Paste,setuptools,six,PasteDeploy,setuptools,six PasteScript 3.4.0 -> 3.5.1 Paste 3.7.1 -> 3.9.0 setuptools 69.0.3 -> skipped six 1.16.0 -> no upgrade PasteDeploy 3.1.0 -> no upgrade setuptools 69.0.3 -> skipped six 1.16.0 -> no upgrade --- requirements.txt | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4ced2bb56..cb0179cf1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -123,7 +123,7 @@ packaging==23.2 # pytest-sugar paginate==0.5.6 # via -r requirements.in -paste==3.7.1 +paste==3.9.0 # via # -r requirements.in # easywidgets @@ -132,7 +132,7 @@ pastedeploy==3.1.0 # via # -r requirements.in # pastescript -pastescript==3.4.0 +pastescript==3.5.1 # via -r requirements.in pillow==10.3.0 # via -r requirements.in @@ -215,8 +215,6 @@ six==1.16.0 # easywidgets # genshi # html5lib -# paste -# pastescript # python-dateutil # sxsdiff # webhelpers2
(allura) 15/19: [#8557] Upgrade testfixtures 7.2.2 -> 8.1.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 076b9c20d64791a8e606e9c788e59de5075b8026 Author: Guillermo Cruz AuthorDate: Thu Apr 18 00:11:37 2024 + [#8557] Upgrade testfixtures 7.2.2 -> 8.1.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cd7dd0e39..c71f264f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -226,7 +226,7 @@ sxsdiff==0.3.0 # via -r requirements.in termcolor==2.4.0 # via pytest-sugar -testfixtures==7.2.2 +testfixtures==8.1.0 # via -r requirements.in textile==4.0.2 # via pypeline
(allura) 12/19: [#8557] Upgrade WebHelpers2 2.0 -> 2.1, and its deps: MarkupSafe,six
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 4d3ef943e4a63df0627d24c860ec27340cedb015 Author: Guillermo Cruz AuthorDate: Wed Apr 17 23:04:39 2024 + [#8557] Upgrade WebHelpers2 2.0 -> 2.1, and its deps: MarkupSafe,six WebHelpers2 2.0 -> 2.1 MarkupSafe2.1.3 -> 2.1.5 six 1.16.0 -> no upgrade --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6dd3ca705..0575b1e2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -98,7 +98,7 @@ markdown==3.6 # pypeline markdown-checklist==0.4.4 # via -r requirements.in -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements.in # easywidgets @@ -251,7 +251,7 @@ webencodings==0.5.1 # bleach # html5lib # tinycss2 -webhelpers2==2.0 +webhelpers2==2.1 # via -r requirements.in webob==1.8.7 # via
(allura) 18/19: [#8557] Upgrade gunicorn 21.2.0 -> 22.0.0, and its deps: packaging
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 4052bd62eec4612f35d0fcc1e0a10c4b511ce380 Author: Guillermo Cruz AuthorDate: Thu Apr 18 00:23:04 2024 + [#8557] Upgrade gunicorn 21.2.0 -> 22.0.0, and its deps: packaging gunicorn 21.2.0 -> 22.0.0 packaging 23.2 -> 24.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index dc3738d44..8a92b5791 100644 --- a/requirements.txt +++ b/requirements.txt @@ -70,7 +70,7 @@ gitdb==4.0.11 # via gitpython gitpython==3.1.43 # via -r requirements.in -gunicorn==21.2.0 +gunicorn==22.0.0 # via -r requirements.in html5lib==1.1 # via
(allura) 04/19: [#8557] Upgrade beaker-session-jwt 1.0.1 -> no upgrade, and its deps: Beaker,joserfc,cryptography,cffi,pycparser,pymongo
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 43eb276be83685e2f503900ad151fd8b6dbf1da4 Author: Guillermo Cruz AuthorDate: Wed Apr 17 21:58:19 2024 + [#8557] Upgrade beaker-session-jwt 1.0.1 -> no upgrade, and its deps: Beaker,joserfc,cryptography,cffi,pycparser,pymongo beaker-session-jwt1.0.1 -> no upgrade Beaker 1.12.1 -> 1.13.0 joserfc 0.9.0 -> no upgrade cryptography 42.0.5 -> no upgrade cffi 1.16.0 -> no upgrade pycparser 2.21 -> 2.22 pymongo 3.13.0 -> no upgrade (OUTDATED! latest is: 4.6.3) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 795fca23a..df548ad0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -144,7 +144,7 @@ pre-commit==3.7.0 ; python_version >= "3.9" # via -r requirements.in profanityfilter==2.0.6 # via -r requirements.in -pycparser==2.21 +pycparser==2.22 # via cffi pygments==2.17.2 # via -r requirements.in
(allura) 06/19: [#8557] Upgrade GitPython 3.1.41 -> 3.1.43, and its deps: gitdb,smmap
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 8e4fde02f0561b504812ca43361aeb161e7ee35f Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:11:03 2024 + [#8557] Upgrade GitPython 3.1.41 -> 3.1.43, and its deps: gitdb,smmap GitPython3.1.41 -> 3.1.43 gitdb4.0.11 -> no upgrade smmap 5.0.1 -> no upgrade --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c2765e0a4..0d9bf2502 100644 --- a/requirements.txt +++ b/requirements.txt @@ -68,7 +68,7 @@ genshi==0.7.7 # via creoleparser gitdb==4.0.11 # via gitpython -gitpython==3.1.41 +gitpython==3.1.43 # via -r requirements.in gunicorn==21.2.0 # via -r requirements.in
(allura) 16/19: [#8557] Upgrade pytest 7.4.4 -> 8.1.1, and its deps: iniconfig,packaging,pluggy
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 7c6285233a964f7814f1d4b01124f3403a37b363 Author: Guillermo Cruz AuthorDate: Thu Apr 18 00:16:03 2024 + [#8557] Upgrade pytest 7.4.4 -> 8.1.1, and its deps: iniconfig,packaging,pluggy pytest7.4.4 -> 8.1.1 iniconfig 2.0.0 -> no upgrade packaging 23.2 -> 24.0 pluggy1.3.0 -> 1.4.0 --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index c71f264f4..97325bc5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -116,7 +116,7 @@ oauthlib==3.2.2 # via # -r requirements.in # requests-oauthlib -packaging==23.2 +packaging==24.0 # via # gunicorn # pytest @@ -138,7 +138,7 @@ pillow==10.3.0 # via -r requirements.in platformdirs==4.1.0 # via virtualenv -pluggy==1.3.0 +pluggy==1.4.0 # via pytest pre-commit==3.7.0 ; python_version >= "3.9" # via -r requirements.in @@ -160,7 +160,7 @@ pypng==0.20220715.0 # via qrcode pysolr==3.9.0 # via -r requirements.in -pytest==7.4.4 +pytest==8.1.1 # via # -r requirements.in # pytest-sugar
(allura) 10/19: [#8557] Upgrade python-dateutil 2.8.2 -> 2.9.0. (OUTDATED! latest is: 2.9.0.post0), and its deps: six
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 5a9200d4674e5e75872beec1a3691bb6f6371271 Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:37:57 2024 + [#8557] Upgrade python-dateutil 2.8.2 -> 2.9.0. (OUTDATED! latest is: 2.9.0.post0), and its deps: six python-dateutil 2.8.2 -> 2.9.0. (OUTDATED! latest is: 2.9.0.post0) six 1.16.0 -> no upgrade --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 618b179a8..46f463434 100644 --- a/requirements.txt +++ b/requirements.txt @@ -169,7 +169,7 @@ pytest-sugar==0.9.7 # via -r requirements.in pytest-xdist==3.5.0 # via -r requirements.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements.in # easywidgets
(allura) 13/19: [#8557] Upgrade werkzeug 3.0.1 -> 3.0.2, and its deps: MarkupSafe
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit c5490f43d0bf4497cf1becd7b4375a57c9cb2b55 Author: Guillermo Cruz AuthorDate: Wed Apr 17 23:29:35 2024 + [#8557] Upgrade werkzeug 3.0.1 -> 3.0.2, and its deps: MarkupSafe werkzeug 3.0.1 -> 3.0.2 MarkupSafe2.1.3 -> 2.1.5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0575b1e2d..4569843bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -262,7 +262,7 @@ webob==1.8.7 # webtest webtest==3.0.0 # via -r requirements.in -werkzeug==3.0.1 +werkzeug==3.0.2 # via -r requirements.in wrapt==1.16.0 # via -r requirements.in
(allura) 03/19: [#8557] Upgrade Beaker 1.12.1 -> 1.13.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 9c9d092ba2ff0f64ecfb085ecb9dcfea76c70792 Author: Guillermo Cruz AuthorDate: Wed Apr 17 21:56:22 2024 + [#8557] Upgrade Beaker 1.12.1 -> 1.13.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5b1b4a7f1..795fca23a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ # activitystream==0.4.2 # via -r requirements.in -beaker==1.12.1 +beaker==1.13.0 # via # -r requirements.in # beaker-session-jwt
(allura) branch gc/8557 created (now b9f668d3d)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git at b9f668d3d [#8557] Upgrade pre-commit 3.6.0 -> 3.7.0, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs This branch includes the following new commits: new 3aebac998 [#8557] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo new 2bfe922ce [#8557] Upgrade beautifulsoup4 4.12.2 -> 4.12.3, and its deps: soupsieve new 9c9d092ba [#8557] Upgrade Beaker 1.12.1 -> 1.13.0 new 43eb276be [#8557] Upgrade beaker-session-jwt 1.0.1 -> no upgrade, and its deps: Beaker,joserfc,cryptography,cffi,pycparser,pymongo new 844a4d5bb [#8557] Upgrade emoji 2.9.0 -> 2.11.0 new 8e4fde02f [#8557] Upgrade GitPython 3.1.41 -> 3.1.43, and its deps: gitdb,smmap new 094a4ad5f [#8557] Upgrade Markdown 3.5.2 -> 3.6 new 88d5be385 [#8557] Upgrade PasteScript 3.4.0 -> 3.5.1, and its deps: Paste,setuptools,six,PasteDeploy,setuptools,six new 89a6b94c1 [#8557] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,regex,docutils new 5a9200d46 [#8557] Upgrade python-dateutil 2.8.2 -> 2.9.0. (OUTDATED! latest is: 2.9.0.post0), and its deps: six new daa6b803e [#8557] Upgrade requests-oauthlib 1.3.1 -> 2.0.0, and its deps: oauthlib,requests,certifi,charset-normalizer,idna,urllib3 new 4d3ef943e [#8557] Upgrade WebHelpers2 2.0 -> 2.1, and its deps: MarkupSafe,six new c5490f43d [#8557] Upgrade werkzeug 3.0.1 -> 3.0.2, and its deps: MarkupSafe new 87663f789 [#8557] Upgrade ruff 0.3.2 -> 0.3.7 new 076b9c20d [#8557] Upgrade testfixtures 7.2.2 -> 8.1.0 new 7c6285233 [#8557] Upgrade pytest 7.4.4 -> 8.1.1, and its deps: iniconfig,packaging,pluggy new b94e1b842 [#8557] Upgrade pytest-sugar 0.9.7 -> 1.0.0, and its deps: packaging,pytest,iniconfig,packaging,pluggy,termcolor new 4052bd62e [#8557] Upgrade gunicorn 21.2.0 -> 22.0.0, and its deps: packaging new b9f668d3d [#8557] Upgrade pre-commit 3.6.0 -> 3.7.0, and its deps: cfgv,identify,nodeenv,setuptools,PyYAML,virtualenv,distlib,filelock,platformdirs The 19 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(allura) 14/19: [#8557] Upgrade ruff 0.3.2 -> 0.3.7
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 87663f789903d5cbc00f4e4c69d1b283b6463494 Author: Guillermo Cruz AuthorDate: Wed Apr 17 23:46:29 2024 + [#8557] Upgrade ruff 0.3.2 -> 0.3.7 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4569843bd..cd7dd0e39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -201,7 +201,7 @@ requests==2.31.0 # requests-oauthlib requests-oauthlib==2.0.0 # via -r requirements.in -ruff==0.3.2 +ruff==0.3.7 # via -r requirements.in setproctitle==1.3.3 # via -r requirements.in
(allura) 17/19: [#8557] Upgrade pytest-sugar 0.9.7 -> 1.0.0, and its deps: packaging,pytest,iniconfig,packaging,pluggy,termcolor
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit b94e1b842b1d33b140c1ffbdb84f061fa34d4c3a Author: Guillermo Cruz AuthorDate: Thu Apr 18 00:20:04 2024 + [#8557] Upgrade pytest-sugar 0.9.7 -> 1.0.0, and its deps: packaging,pytest,iniconfig,packaging,pluggy,termcolor pytest-sugar 0.9.7 -> 1.0.0 packaging 23.2 -> 24.0 pytest7.4.4 -> 8.1.1 iniconfig 2.0.0 -> no upgrade packaging 23.2 -> 24.0 pluggy1.3.0 -> 1.4.0 termcolor 2.4.0 -> no upgrade --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 97325bc5b..dc3738d44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -165,7 +165,7 @@ pytest==8.1.1 # -r requirements.in # pytest-sugar # pytest-xdist -pytest-sugar==0.9.7 +pytest-sugar==1.0.0 # via -r requirements.in pytest-xdist==3.5.0 # via -r requirements.in
(allura) 09/19: [#8557] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,reg
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 89a6b94c1f4278311e536701032784bd92852ff3 Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:30:31 2024 + [#8557] Upgrade Pypeline 0.6.1 -> no upgrade, and its deps: bleach,six,webencodings,html5lib,six,webencodings,Creoleparser,Genshi,six,six,Markdown,textile,html5lib,six,webencodings,regex,docutils Pypeline 0.6.1 -> no upgrade bleach6.1.0 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade html5lib1.1 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade Creoleparser 0.7.5 -> no upgrade Genshi0.7.7 -> no upgrade six 1.16.0 -> no upgrade six 1.16.0 -> no upgrade Markdown 3.5.2 -> 3.6 textile 4.0.2 -> no upgrade html5lib1.1 -> no upgrade six 1.16.0 -> no upgrade webencodings 0.5.1 -> no upgrade regex2023.12.25 -> 2024.4.16 docutils 0.20.1 -> 0.21.1 --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index cb0179cf1..618b179a8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,7 +44,7 @@ diff-match-patch==20230430 # via sxsdiff distlib==0.3.8 # via virtualenv -docutils==0.20.1 +docutils==0.21.1 # via pypeline easywidgets==0.4.1 # via -r requirements.in @@ -186,7 +186,7 @@ pyyaml==6.0.1 # via pre-commit qrcode==7.4.2 # via -r requirements.in -regex==2023.12.25 +regex==2024.4.16 # via # regex-as-re-globally # textile
(allura) 11/19: [#8557] Upgrade requests-oauthlib 1.3.1 -> 2.0.0, and its deps: oauthlib,requests,certifi,charset-normalizer,idna,urllib3
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit daa6b803e3460d47e66e0b0eb88bde3f17b60137 Author: Guillermo Cruz AuthorDate: Wed Apr 17 23:02:48 2024 + [#8557] Upgrade requests-oauthlib 1.3.1 -> 2.0.0, and its deps: oauthlib,requests,certifi,charset-normalizer,idna,urllib3 requests-oauthlib 1.3.1 -> 2.0.0 oauthlib 3.2.2 -> no upgrade requests 2.31.0 -> no upgrade certifi 2023.11.17 -> 2024.2.2 charset-normalizer3.3.2 -> no upgrade idna3.7 -> no upgrade urllib3 2.1.0 -> 2.2.1 --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 46f463434..6dd3ca705 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ bleach[css]==6.1.0 # via # bleach # pypeline -certifi==2023.11.17 +certifi==2024.2.2 # via requests cffi==1.16.0 # via cryptography @@ -199,7 +199,7 @@ requests==2.31.0 # -r requirements.in # pysolr # requests-oauthlib -requests-oauthlib==1.3.1 +requests-oauthlib==2.0.0 # via -r requirements.in ruff==0.3.2 # via -r requirements.in @@ -240,7 +240,7 @@ turbogears2==2.4.3 # via -r requirements.in typing-extensions==4.9.0 # via qrcode -urllib3==2.1.0 +urllib3==2.2.1 # via requests virtualenv==20.25.0 # via pre-commit
(allura) 01/19: [#8557] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 3aebac9986cae0ad91f9301d8b10b0d1182df2b1 Author: Guillermo Cruz AuthorDate: Wed Apr 17 21:47:44 2024 + [#8557] Upgrade ActivityStream 0.4.2 -> no upgrade, and its deps: pymongo ActivityStream0.4.2 -> no upgrade pymongo 3.13.0 -> no upgrade (OUTDATED! latest is: 4.6.3) --- requirements.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2bb47701c..25c7f2a3d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,9 @@ beautifulsoup4==4.12.2 # -r requirements.in # webtest bleach[css]==6.1.0 -# via pypeline +# via +# bleach +# pypeline certifi==2023.11.17 # via requests cffi==1.16.0 @@ -138,9 +140,7 @@ platformdirs==4.1.0 # via virtualenv pluggy==1.3.0 # via pytest -pre-commit==3.6.0 ; python_version >= "3.9" -# via -r requirements.in -pre-commit==3.5.0 ; python_version < "3.9" +pre-commit==3.7.0 ; python_version >= "3.9" # via -r requirements.in profanityfilter==2.0.6 # via -r requirements.in
(allura) 02/19: [#8557] Upgrade beautifulsoup4 4.12.2 -> 4.12.3, and its deps: soupsieve
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 2bfe922ce078e810cd5b1203e625adeb0a32953a Author: Guillermo Cruz AuthorDate: Wed Apr 17 21:54:39 2024 + [#8557] Upgrade beautifulsoup4 4.12.2 -> 4.12.3, and its deps: soupsieve beautifulsoup4 4.12.2 -> 4.12.3 soupsieve 2.5 -> no upgrade --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 25c7f2a3d..5b1b4a7f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ beaker==1.12.1 # beaker-session-jwt beaker-session-jwt==1.0.1 # via -r requirements.in -beautifulsoup4==4.12.2 +beautifulsoup4==4.12.3 # via # -r requirements.in # webtest @@ -222,7 +222,7 @@ six==1.16.0 # webhelpers2 smmap==5.0.1 # via gitdb -soupsieve==2.4.1 +soupsieve==2.5 # via beautifulsoup4 sxsdiff==0.3.0 # via -r requirements.in
(allura) 05/19: [#8557] Upgrade emoji 2.9.0 -> 2.11.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 844a4d5bb6a9a7d13c61a9da31fa85b33284b01e Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:05:16 2024 + [#8557] Upgrade emoji 2.9.0 -> 2.11.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index df548ad0c..c2765e0a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ docutils==0.20.1 # via pypeline easywidgets==0.4.1 # via -r requirements.in -emoji==2.9.0 +emoji==2.11.0 # via -r requirements.in execnet==2.0.2 # via pytest-xdist
(allura) 07/19: [#8557] Upgrade Markdown 3.5.2 -> 3.6
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8557 in repository https://gitbox.apache.org/repos/asf/allura.git commit 094a4ad5fcee96b38803e9c4745bec5b1490f824 Author: Guillermo Cruz AuthorDate: Wed Apr 17 22:14:59 2024 + [#8557] Upgrade Markdown 3.5.2 -> 3.6 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0d9bf2502..4ced2bb56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -91,7 +91,7 @@ jinja2==3.1.3 # via -r requirements.in joserfc==0.9.0 # via beaker-session-jwt -markdown==3.5.2 +markdown==3.6 # via # -r requirements.in # markdown-checklist
(allura) branch master updated: bump idna 3.6 -> 3.7
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 60ada4f22 bump idna 3.6 -> 3.7 60ada4f22 is described below commit 60ada4f225cf987105da2c67e65a42aa34831105 Author: Guillermo Cruz AuthorDate: Fri Apr 12 14:48:50 2024 + bump idna 3.6 -> 3.7 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 990f2b351..2bb47701c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -77,7 +77,7 @@ html5lib==1.1 # textile identify==2.5.33 # via pre-commit -idna==3.6 +idna==3.7 # via requests inflection==0.5.1 # via profanityfilter
(allura) 03/03: [#8556] simplify more calls
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 1edc56632b52511adeba2cbd724af573fe554b86 Author: Dave Brondsema AuthorDate: Wed Apr 3 13:43:48 2024 -0400 [#8556] simplify more calls --- Allura/allura/app.py | 2 +- Allura/allura/controllers/auth.py | 6 +++--- Allura/allura/ext/admin/admin_main.py | 2 +- Allura/allura/tests/model/test_artifact.py| 6 +++--- Allura/allura/tests/test_plugin.py| 2 +- ForgeBlog/forgeblog/tests/test_roles.py | 8 ++-- ForgeDiscussion/forgediscussion/tests/test_forum_roles.py | 8 ++-- ForgeFeedback/forgefeedback/tests/test_feedback_roles.py | 8 ++-- ForgeFiles/forgefiles/tests/test_files_roles.py | 8 ++-- ForgeShortUrl/forgeshorturl/main.py | 2 +- ForgeTracker/forgetracker/tests/test_tracker_roles.py | 8 ++-- ForgeTracker/forgetracker/tracker_main.py | 6 +++--- ForgeWiki/forgewiki/tests/test_wiki_roles.py | 8 ++-- ForgeWiki/forgewiki/wiki_main.py | 2 +- 14 files changed, 50 insertions(+), 26 deletions(-) diff --git a/Allura/allura/app.py b/Allura/allura/app.py index 518269622..55cb7d299 100644 --- a/Allura/allura/app.py +++ b/Allura/allura/app.py @@ -495,7 +495,7 @@ class Application(ActivityObject): :rtype: bool """ -return has_access(self, 'read')(user=user) +return has_access(self, 'read', user) def subscribe_admins(self): """Subscribe all project Admins (for this Application's project) to the diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py index d74f48445..fab1757e8 100644 --- a/Allura/allura/controllers/auth.py +++ b/Allura/allura/controllers/auth.py @@ -513,9 +513,9 @@ class AuthController(BaseController): log.info("Can't find repo at %s on repo_path %s", rest[0], repo_path) return disallow -return dict(allow_read=has_access(c.app, 'read')(user=user), -allow_write=has_access(c.app, 'write')(user=user), -allow_create=has_access(c.app, 'create')(user=user)) +return dict(allow_read=bool(has_access(c.app, 'read', user)), +allow_write=bool(has_access(c.app, 'write', user)), +allow_create=bool(has_access(c.app, 'create', user))) @expose('jinja:allura:templates/pwd_expired.html') @without_trailing_slash diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py index 0904c0ce8..6feecd038 100644 --- a/Allura/allura/ext/admin/admin_main.py +++ b/Allura/allura/ext/admin/admin_main.py @@ -97,7 +97,7 @@ class AdminApp(Application): def is_visible_to(self, user): '''Whether the user can view the app.''' -return has_access(c.project, 'create')(user=user) +return has_access(c.project, 'create', user) @staticmethod def installable_tools_for(project): diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py index 9eb2c8b4e..d63a2041e 100644 --- a/Allura/allura/tests/model/test_artifact.py +++ b/Allura/allura/tests/model/test_artifact.py @@ -85,13 +85,13 @@ class TestArtifact: pr = M.ProjectRole.by_user(u, upsert=True) ThreadLocalODMSession.flush_all() REGISTRY.register(allura.credentials, allura.lib.security.Credentials()) -assert not security.has_access(pg, 'delete')(user=u) +assert not security.has_access(pg, 'delete', u) pg.acl.append(M.ACE.allow(pr._id, 'delete')) ThreadLocalODMSession.flush_all() -assert security.has_access(pg, 'delete')(user=u) +assert security.has_access(pg, 'delete', u) pg.acl.pop() ThreadLocalODMSession.flush_all() -assert not security.has_access(pg, 'delete')(user=u) +assert not security.has_access(pg, 'delete', u) def test_artifact_index(self): pg = WM.Page(title='TestPage1') diff --git a/Allura/allura/tests/test_plugin.py b/Allura/allura/tests/test_plugin.py index 964502cf2..c57e9e4a4 100644 --- a/Allura/allura/tests/test_plugin.py +++ b/Allura/allura/tests/test_plugin.py @@ -50,7 +50,7 @@ class TestProjectRegistrationProvider: @patch('allura.lib.security.has_access') def test_validate_project_15char_user(self, has_access): -has_access.return_value = TruthyCallable(lambda: True) +
(allura) 02/03: [#8556] remove unnecessary extra () on has_access calls
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 74e83f20670595ebcdc4e59fc948810c9eeb1813 Author: Dave Brondsema AuthorDate: Wed Apr 3 11:08:11 2024 -0400 [#8556] remove unnecessary extra () on has_access calls --- Allura/allura/app.py | 8 +-- Allura/allura/controllers/project.py | 2 +- Allura/allura/controllers/rest.py | 4 +- Allura/allura/ext/admin/admin_main.py | 4 +- .../ext/admin/templates/project_screenshots.html | 4 +- Allura/allura/lib/macro.py | 14 +++--- Allura/allura/lib/plugin.py| 4 +- Allura/allura/lib/security.py | 4 +- Allura/allura/model/neighborhood.py| 2 +- Allura/allura/model/notification.py| 4 +- Allura/allura/templates/jinja_master/master.html | 2 +- .../templates/jinja_master/sidebar_menu.html | 2 +- Allura/allura/templates/jinja_master/top_nav.html | 4 +- .../templates/neighborhood_project_list.html | 2 +- Allura/allura/templates/project_list.html | 4 +- Allura/allura/templates/repo/merge_request.html| 6 +-- Allura/allura/templates/repo/repo_master.html | 2 +- Allura/allura/templates/widgets/post_widget.html | 8 +-- .../templates/widgets/project_list_widget.html | 2 +- Allura/allura/templates/widgets/thread_header.html | 2 +- Allura/allura/templates/widgets/thread_widget.html | 4 +- Allura/allura/templates/widgets/vote.html | 2 +- .../templates_responsive/jinja_master/master.html | 2 +- .../jinja_master/sidebar_menu.html | 2 +- .../templates_responsive/jinja_master/top_nav.html | 4 +- Allura/allura/tests/model/test_notification.py | 13 ++--- Allura/allura/tests/test_helpers.py| 24 - Allura/allura/tests/test_plugin.py | 6 +-- Allura/allura/tests/test_security.py | 38 +++--- ForgeBlog/forgeblog/main.py| 10 ++-- ForgeBlog/forgeblog/templates/blog/post.html | 4 +- .../forgeblog/templates/blog/post_history.html | 2 +- .../templates/blog_widgets/preview_post.html | 2 +- .../templates/blog_widgets/view_post.html | 2 +- ForgeChat/forgechat/command.py | 2 +- .../forgediscussion/controllers/forum.py | 8 +-- .../forgediscussion/controllers/root.py| 6 +-- ForgeDiscussion/forgediscussion/forum_main.py | 12 ++--- .../discussion_widgets/thread_header.html | 4 +- .../templates/discussionforums/index.html | 4 +- .../templates/discussionforums/thread.html | 2 +- ForgeFiles/forgefiles/templates/files.html | 10 ++-- ForgeGit/forgegit/templates/git/index.html | 4 +- ForgeSVN/forgesvn/templates/svn/index.html | 4 +- .../forgetracker/templates/tracker/search.html | 6 +-- .../forgetracker/templates/tracker/ticket.html | 2 +- .../forgetracker/tests/unit/test_ticket_model.py | 58 +++--- ForgeTracker/forgetracker/tracker_main.py | 24 - ForgeWiki/forgewiki/templates/wiki/page_edit.html | 6 +-- .../forgewiki/templates/wiki/page_history.html | 2 +- ForgeWiki/forgewiki/templates/wiki/page_view.html | 4 +- ForgeWiki/forgewiki/wiki_main.py | 10 ++-- 52 files changed, 180 insertions(+), 187 deletions(-) diff --git a/Allura/allura/app.py b/Allura/allura/app.py index 23f18d1b3..518269622 100644 --- a/Allura/allura/app.py +++ b/Allura/allura/app.py @@ -662,7 +662,7 @@ class Application(ActivityObject): admin_url = c.project.url() + 'admin/' + \ self.config.options.mount_point + '/' links = [] -if self.permissions and has_access(c.project, 'admin')(): +if self.permissions and has_access(c.project, 'admin'): links.append( SitemapEntry('Permissions', admin_url + 'permissions')) if force_options or len(self.config_options) > 3: @@ -943,7 +943,7 @@ class DefaultAdminController(BaseController, AdminControllerMixin): block_list[ace.permission].append((role.user, ace.reason)) return dict( app=self.app, -allow_config=has_access(c.project, 'admin')(), +allow_config=has_access(c.project, 'admin'), permissions=permissions, block_list=block_list) @@ -954,7 +954,7 @@ class DefaultAdminController(BaseController, AdminControllerMixin): """ return dict( app=self.app, -allow_config=has_access(self.app, 'configure')()) +allow_config=has_access(self.app, 'c
(allura) branch master updated (b6f3dcbae -> 1edc56632)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from b6f3dcbae [#8555] debugging option within has_access new e0ee0fd97 [#8556] avoid recursive TruthyCallable new 74e83f206 [#8556] remove unnecessary extra () on has_access calls new 1edc56632 [#8556] simplify more calls The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/app.py | 10 ++-- Allura/allura/controllers/auth.py | 6 +-- Allura/allura/controllers/project.py | 2 +- Allura/allura/controllers/rest.py | 4 +- Allura/allura/ext/admin/admin_main.py | 6 +-- .../ext/admin/templates/project_screenshots.html | 4 +- Allura/allura/lib/macro.py | 14 +++--- Allura/allura/lib/plugin.py| 4 +- Allura/allura/lib/security.py | 9 ++-- Allura/allura/model/neighborhood.py| 2 +- Allura/allura/model/notification.py| 4 +- Allura/allura/templates/jinja_master/master.html | 2 +- .../templates/jinja_master/sidebar_menu.html | 2 +- Allura/allura/templates/jinja_master/top_nav.html | 4 +- .../templates/neighborhood_project_list.html | 2 +- Allura/allura/templates/project_list.html | 4 +- Allura/allura/templates/repo/merge_request.html| 6 +-- Allura/allura/templates/repo/repo_master.html | 2 +- Allura/allura/templates/widgets/post_widget.html | 8 +-- .../templates/widgets/project_list_widget.html | 2 +- Allura/allura/templates/widgets/thread_header.html | 2 +- Allura/allura/templates/widgets/thread_widget.html | 4 +- Allura/allura/templates/widgets/vote.html | 2 +- .../templates_responsive/jinja_master/master.html | 2 +- .../jinja_master/sidebar_menu.html | 2 +- .../templates_responsive/jinja_master/top_nav.html | 4 +- Allura/allura/tests/model/test_artifact.py | 6 +-- Allura/allura/tests/model/test_notification.py | 13 ++--- Allura/allura/tests/test_helpers.py| 24 - Allura/allura/tests/test_plugin.py | 8 +-- Allura/allura/tests/test_security.py | 38 +++--- ForgeBlog/forgeblog/main.py| 10 ++-- ForgeBlog/forgeblog/templates/blog/post.html | 4 +- .../forgeblog/templates/blog/post_history.html | 2 +- .../templates/blog_widgets/preview_post.html | 2 +- .../templates/blog_widgets/view_post.html | 2 +- ForgeBlog/forgeblog/tests/test_roles.py| 8 ++- ForgeChat/forgechat/command.py | 2 +- .../forgediscussion/controllers/forum.py | 8 +-- .../forgediscussion/controllers/root.py| 6 +-- ForgeDiscussion/forgediscussion/forum_main.py | 12 ++--- .../discussion_widgets/thread_header.html | 4 +- .../templates/discussionforums/index.html | 4 +- .../templates/discussionforums/thread.html | 2 +- .../forgediscussion/tests/test_forum_roles.py | 8 ++- .../forgefeedback/tests/test_feedback_roles.py | 8 ++- ForgeFiles/forgefiles/templates/files.html | 10 ++-- ForgeFiles/forgefiles/tests/test_files_roles.py| 8 ++- ForgeGit/forgegit/templates/git/index.html | 4 +- ForgeSVN/forgesvn/templates/svn/index.html | 4 +- ForgeShortUrl/forgeshorturl/main.py| 2 +- .../forgetracker/templates/tracker/search.html | 6 +-- .../forgetracker/templates/tracker/ticket.html | 2 +- .../forgetracker/tests/test_tracker_roles.py | 8 ++- .../forgetracker/tests/unit/test_ticket_model.py | 58 +++--- ForgeTracker/forgetracker/tracker_main.py | 30 +-- ForgeWiki/forgewiki/templates/wiki/page_edit.html | 6 +-- .../forgewiki/templates/wiki/page_history.html | 2 +- ForgeWiki/forgewiki/templates/wiki/page_view.html | 4 +- ForgeWiki/forgewiki/tests/test_wiki_roles.py | 8 ++- ForgeWiki/forgewiki/wiki_main.py | 12 ++--- 61 files changed, 233 insertions(+), 215 deletions(-)
(allura) 01/03: [#8556] avoid recursive TruthyCallable
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit e0ee0fd97f37bbf506ce3812310c762260b4ca60 Author: Dave Brondsema AuthorDate: Wed Apr 3 11:06:22 2024 -0400 [#8556] avoid recursive TruthyCallable --- Allura/allura/lib/security.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Allura/allura/lib/security.py b/Allura/allura/lib/security.py index e73f6ad2b..8f59a4ba8 100644 --- a/Allura/allura/lib/security.py +++ b/Allura/allura/lib/security.py @@ -305,7 +305,7 @@ def debug_obj(obj) -> str: return str(obj) -def has_access(obj, permission: str, user: M.User | None = None, project: M.Project | None = None): +def has_access(obj, permission: str, user: M.User | None = None, project: M.Project | None = None) -> TruthyCallable: '''Return whether the given user has the permission name on the given object. - First, all the roles for a user in the given project context are computed. @@ -348,7 +348,7 @@ def has_access(obj, permission: str, user: M.User | None = None, project: M.Proj DEBUG = False -def predicate(obj=obj, user=user, project=project, roles=None): +def predicate(obj=obj, user=user, project=project, roles=None) -> bool: if obj is None: if DEBUG: log.debug(f'{user} denied {permission} on {debug_obj(obj)} ({debug_obj(project)})') @@ -404,6 +404,7 @@ def has_access(obj, permission: str, user: M.User | None = None, project: M.Proj result = has_access(project, 'admin', user=user)() else: result = False +result = bool(result) if DEBUG: log.debug(f"{user.username} '{permission}' {result} from parent(s) on {debug_obj(obj)} ({debug_obj(project)})") return result
(allura) 02/02: [#8555] debugging option within has_access
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit b6f3dcbae90da7ea320a3fa8614a29728f661219 Author: Dave Brondsema AuthorDate: Tue Apr 2 17:44:46 2024 -0400 [#8555] debugging option within has_access --- Allura/allura/lib/security.py | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Allura/allura/lib/security.py b/Allura/allura/lib/security.py index 3c16d05be..e73f6ad2b 100644 --- a/Allura/allura/lib/security.py +++ b/Allura/allura/lib/security.py @@ -293,6 +293,17 @@ def is_denied(obj, permission: str, user: M.User, project: M.Project) -> bool: return False +def debug_obj(obj) -> str: +if hasattr(obj, 'url'): +url = obj.url +if callable(url): +try: +url = url() +except Exception: +url = obj._id +return f'{obj.__class__.__name__} {url}' +return str(obj) + def has_access(obj, permission: str, user: M.User | None = None, project: M.Project | None = None): '''Return whether the given user has the permission name on the given object. @@ -335,8 +346,12 @@ def has_access(obj, permission: str, user: M.User | None = None, project: M.Proj ''' from allura import model as M +DEBUG = False + def predicate(obj=obj, user=user, project=project, roles=None): if obj is None: +if DEBUG: +log.debug(f'{user} denied {permission} on {debug_obj(obj)} ({debug_obj(project)})') return False if roles is None: if user is None: @@ -354,27 +369,31 @@ def has_access(obj, permission: str, user: M.User | None = None, project: M.Proj else: project = getattr(obj, 'project', None) or c.project project = project.root_project -roles = cred.user_roles( -user_id=user._id, project_id=project._id).reaching_ids +roles: RoleCache = cred.user_roles(user_id=user._id, project_id=project._id).reaching_roles # TODO: move deny logic into loop below; see ticket [#6715] if is_denied(obj, permission, user, project): +if DEBUG: +log.debug(f"{user.username} '{permission}' denied on {debug_obj(obj)} ({debug_obj(project)})") return False chainable_roles = [] -for rid in roles: +for role in roles: for ace in obj.acl: -if M.ACE.match(ace, rid, permission): +if M.ACE.match(ace, role['_id'], permission): if ace.access == M.ACE.ALLOW: # access is allowed -# log.info('%s: True', txt) +if DEBUG: +log.debug(f"{user.username} '{permission}' granted on {debug_obj(obj)} ({debug_obj(project)})") return True else: -# access is denied for this role +# access is denied for this particular role +if DEBUG: +log.debug(f"{user.username} '{permission}' denied for role={role['name'] or role['_id']} (BUT continuing to see if other roles permit) on {debug_obj(obj)} ({debug_obj(project)})") break else: # access neither allowed or denied, may chain to parent context -chainable_roles.append(rid) +chainable_roles.append(role) parent = obj.parent_security_context() if parent and chainable_roles: result = has_access(parent, permission, user=user, project=project)( @@ -385,7 +404,8 @@ def has_access(obj, permission: str, user: M.User | None = None, project: M.Proj result = has_access(project, 'admin', user=user)() else: result = False -# log.info('%s: %s', txt, result) +if DEBUG: +log.debug(f"{user.username} '{permission}' {result} from parent(s) on {debug_obj(obj)} ({debug_obj(project)})") return result return TruthyCallable(predicate)
(allura) 01/02: [#8555] some specific checks for blocked users, when creating new forum threads
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 431109b7ccb9b2f772cd05f0103052471642d2b6 Author: Dave Brondsema AuthorDate: Tue Apr 2 17:44:28 2024 -0400 [#8555] some specific checks for blocked users, when creating new forum threads --- Allura/allura/lib/security.py | 32 +++--- Allura/allura/model/discuss.py | 6 +++- .../forgediscussion/controllers/root.py| 10 +-- .../tests/functional/test_forum_admin.py | 17 ++-- 4 files changed, 49 insertions(+), 16 deletions(-) diff --git a/Allura/allura/lib/security.py b/Allura/allura/lib/security.py index cc874822d..3c16d05be 100644 --- a/Allura/allura/lib/security.py +++ b/Allura/allura/lib/security.py @@ -19,12 +19,12 @@ This module provides the security predicates used in decorating various models. """ -import six -import sys +from __future__ import annotations import logging from collections import defaultdict import hashlib import requests +import typing from tg import tmpl_context as c from tg import request @@ -35,6 +35,9 @@ import tg from allura.lib.utils import TruthyCallable +if typing.TYPE_CHECKING: +from allura.model import M + log = logging.getLogger(__name__) @@ -277,7 +280,21 @@ class RoleCache: return set(self.reaching_ids) -def has_access(obj, permission, user=None, project=None): +def is_denied(obj, permission: str, user: M.User, project: M.Project) -> bool: +from allura import model as M + +if user != M.User.anonymous(): +user_roles = Credentials.get().user_roles(user_id=user._id, + project_id=project.root_project._id) +for r in user_roles: +deny_user = M.ACE.deny(r['_id'], permission) +if M.ACL.contains(deny_user, obj.acl): +return True + +return False + + +def has_access(obj, permission: str, user: M.User | None = None, project: M.Project | None = None): '''Return whether the given user has the permission name on the given object. - First, all the roles for a user in the given project context are computed. @@ -341,13 +358,8 @@ def has_access(obj, permission, user=None, project=None): user_id=user._id, project_id=project._id).reaching_ids # TODO: move deny logic into loop below; see ticket [#6715] -if user != M.User.anonymous(): -user_roles = Credentials.get().user_roles(user_id=user._id, - project_id=project.root_project._id) -for r in user_roles: -deny_user = M.ACE.deny(r['_id'], permission) -if M.ACL.contains(deny_user, obj.acl): -return False +if is_denied(obj, permission, user, project): +return False chainable_roles = [] for rid in roles: diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py index 3ecb42907..92999e295 100644 --- a/Allura/allura/model/discuss.py +++ b/Allura/allura/model/discuss.py @@ -33,10 +33,11 @@ from ming.odm.property import (FieldProperty, RelationProperty, ForeignIdProperty) from ming.utils import LazyProperty from bson import ObjectId +from webob import exc from allura.lib import helpers as h from allura.lib import security -from allura.lib.security import require_access, has_access +from allura.lib.security import require_access, has_access, is_denied from allura.lib import utils from allura.model.notification import Notification, Mailbox from .artifact import Artifact, ArtifactReference, VersionedArtifact, Snapshot, Message, Feed, ReactableArtifact @@ -335,6 +336,9 @@ class Thread(Artifact, ActivityObject): is_meta=False, subscribe=False, **kw): if not ignore_security: require_access(self, 'post') +# check app-level for Blocked Users, in addition to the standard `self` check above +if is_denied(self.app, 'post', c.user, self.project): +raise exc.HTTPForbidden if subscribe: self.primary().subscribe() if message_id is None: diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py index 212245f79..251d57923 100644 --- a/ForgeDiscussion/forgediscussion/controllers/root.py +++ b/ForgeDiscussion/forgediscussion/controllers/root.py @@ -110,9 +110,13 @@ class RootController(BaseController, DispatchIndex, FeedController): @with_trailing_slash @expose('jinja:forgediscussion:templates/discussionforums/create_topic.html') def create_topic(self, forum_name=None, new_forum=False,
(allura) branch master updated (d7af0320d -> b6f3dcbae)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from d7af0320d bump Pillow package 10.2.0 -> 10.3.0 new 431109b7c [#8555] some specific checks for blocked users, when creating new forum threads new b6f3dcbae [#8555] debugging option within has_access The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/lib/security.py | 68 -- Allura/allura/model/discuss.py | 6 +- .../forgediscussion/controllers/root.py| 10 +++- .../tests/functional/test_forum_admin.py | 17 +- 4 files changed, 77 insertions(+), 24 deletions(-)
(allura) branch master updated: bump Pillow package 10.2.0 -> 10.3.0
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new d7af0320d bump Pillow package 10.2.0 -> 10.3.0 d7af0320d is described below commit d7af0320d41338737844dad46c8ff534516ed984 Author: Guillermo Cruz AuthorDate: Thu Apr 4 14:39:41 2024 + bump Pillow package 10.2.0 -> 10.3.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 656376a0e..990f2b351 100644 --- a/requirements.txt +++ b/requirements.txt @@ -132,7 +132,7 @@ pastedeploy==3.1.0 # pastescript pastescript==3.4.0 # via -r requirements.in -pillow==10.2.0 +pillow==10.3.0 # via -r requirements.in platformdirs==4.1.0 # via virtualenv
(allura) branch master updated (f79788805 -> 114c7bea1)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from f79788805 Merge commit '8507cf9ae558ea4f93940f7284dcbd004c19e065' add 114c7bea1 [#8540] wiki pages' recent sort by mod_date; simplify code No new revisions were added by this update. Summary of changes: ForgeWiki/forgewiki/templates/wiki/browse.html | 6 +- ForgeWiki/forgewiki/wiki_main.py | 16 2 files changed, 5 insertions(+), 17 deletions(-)
(allura) 05/05: [#8539] code simplifications
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 0ca517797c45c4b7159ddd5acf8bcf40112ece29 Author: Dave Brondsema AuthorDate: Wed Mar 20 17:16:19 2024 -0400 [#8539] code simplifications --- Allura/allura/command/taskd_cleanup.py | 4 +-- Allura/allura/controllers/project.py | 2 +- Allura/allura/controllers/rest.py | 2 +- Allura/allura/controllers/site_admin.py| 2 +- Allura/allura/lib/utils.py | 2 +- Allura/allura/tests/decorators.py | 8 ++ .../allura/tests/functional/test_neighborhood.py | 4 +-- .../tests/functional/test_personal_dashboard.py| 29 +++--- .../allura/tests/functional/test_user_profile.py | 17 ++--- Allura/allura/tests/model/test_project.py | 11 Allura/allura/tests/test_commands.py | 4 +-- Allura/allura/tests/test_helpers.py| 5 ++-- Allura/allura/tests/test_tasks.py | 10 Allura/allura/tests/test_webhooks.py | 5 ++-- Allura/allura/tests/unit/test_session.py | 28 ++--- ForgeActivity/forgeactivity/main.py| 2 +- .../tests/unit/test_root_controller.py | 4 +-- ForgeImporters/forgeimporters/github/__init__.py | 2 +- ForgeTracker/forgetracker/tracker_main.py | 2 +- ruff.toml | 5 20 files changed, 71 insertions(+), 77 deletions(-) diff --git a/Allura/allura/command/taskd_cleanup.py b/Allura/allura/command/taskd_cleanup.py index 0f4ec913e..232773f93 100644 --- a/Allura/allura/command/taskd_cleanup.py +++ b/Allura/allura/command/taskd_cleanup.py @@ -154,7 +154,7 @@ class TaskdCleanupCommand(base.Command): def _check_taskd_status(self, pid): for i in range(self.options.num_retry): -retry = False if i == 0 else True +retry = i != 0 status = self._taskd_status(pid, retry) if ('taskd pid %s' % pid) in status: return 'OK' @@ -164,7 +164,7 @@ class TaskdCleanupCommand(base.Command): def _check_task(self, taskd_pid, task): for i in range(self.options.num_retry): -retry = False if i == 0 else True +retry = i != 0 status = self._taskd_status(taskd_pid, retry) line = 'taskd pid {} is currently handling task {}'.format( taskd_pid, task) diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py index f4d8c9865..f04fa5b62 100644 --- a/Allura/allura/controllers/project.py +++ b/Allura/allura/controllers/project.py @@ -564,7 +564,7 @@ class NeighborhoodAdminController: set_nav(self.neighborhood) c.overview_form = W.neighborhood_overview_form allow_undelete = asbool(config.get('allow_project_undelete', True)) -allow_wiki_as_root = True if get_default_wiki_page() else False +allow_wiki_as_root = bool(get_default_wiki_page()) return dict( neighborhood=self.neighborhood, diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py index f077b3d40..255348208 100644 --- a/Allura/allura/controllers/rest.py +++ b/Allura/allura/controllers/rest.py @@ -189,7 +189,7 @@ class Oauth1Validator(oauthlib.oauth1.RequestValidator): if request.environ.get('paste.testing'): # test suite is running return False -elif asbool(config.get('debug')) and config['base_url'].startswith('http://'): +elif asbool(config.get('debug')) and config['base_url'].startswith('http://'): # noqa: SIM103 # development w/o https return False else: diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py index 07009028b..252aea353 100644 --- a/Allura/allura/controllers/site_admin.py +++ b/Allura/allura/controllers/site_admin.py @@ -184,7 +184,7 @@ class SiteAdminController: try: end_dt = datetime.strptime(end_dt, '%Y/%m/%d %H:%M:%S') except ValueError: -end_dt = start_dt - timedelta(days=3) if not end_dt else end_dt +end_dt = end_dt if end_dt else start_dt - timedelta(days=3) start = bson.ObjectId.from_datetime(start_dt) end = bson.ObjectId.from_datetime(end_dt) nb = M.Neighborhood.query.get(name='Users') diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py index 0cf6b8c3c..de33f559b 100644 --- a/Allura/allura/lib/utils.py +++ b/Allura/allura/lib/utils.py @@ -337,7 +337,7 @@ class AntiSpam: if params is None: para
(allura) 02/05: [#8539] remove old teamforge import script, which had lots of hardcoded specifics
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 0912282107b8b5835a49a263b8b3bc9b3b1dc0a2 Author: Dave Brondsema AuthorDate: Wed Mar 20 16:20:08 2024 -0400 [#8539] remove old teamforge import script, which had lots of hardcoded specifics --- .gitignore |1 - .pre-commit-config.yaml|1 - Allura/docs/getting_started/administration.rst | 11 - scripts/teamforge-import.py| 1126 4 files changed, 1139 deletions(-) diff --git a/.gitignore b/.gitignore index c620e794e..97d6ae99e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,6 @@ Allura/allura/templates/home Allura/allura/templates/var Allura/production.ini Allura/forced_upgrade.ini -scripts/teamforge-export/ /node_modules report.clonedigger .ropeproject diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d3eea1f2..bfda2f671 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,6 @@ repos: (?x)^( Allura/allura/eventslistener.py| Allura/allura/lib/.*| -scripts/teamforge-import.py )$ diff --git a/Allura/docs/getting_started/administration.rst b/Allura/docs/getting_started/administration.rst index 03b413f21..5d9bff267 100644 --- a/Allura/docs/getting_started/administration.rst +++ b/Allura/docs/getting_started/administration.rst @@ -314,17 +314,6 @@ scrub-allura-data.py :prog: paster script development.ini ../scripts/scrub-allura-data.py -- -teamforge-import.py - -*Cannot currently be run as a background task.* - -Extract data from a TeamForge site (via its web API), and import directly into Allura. There are some hard-coded -and extra functions in this script, which should be removed or updated before being used again. -Requires running: :command:`pip install suds` first. :: - -usage: paster script development.ini ../scripts/teamforge-import.py -- --help - .. _site-notifications: Site Notifications diff --git a/scripts/teamforge-import.py b/scripts/teamforge-import.py deleted file mode 100644 index 15b669d38..0 --- a/scripts/teamforge-import.py +++ /dev/null @@ -1,1126 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import logging -from ast import literal_eval -from getpass import getpass -from optparse import OptionParser -from tg import tmpl_context as c -import re -import os -from time import mktime -import time -import json -from urllib.parse import urlparse -import six.moves.urllib.request -import six.moves.urllib.parse -import six.moves.urllib.error -from http.cookiejar import CookieJar -from datetime import datetime -from configparser import ConfigParser -import random -import string - -import sqlalchemy -from suds.client import Client -from ming.odm.odmsession import ThreadLocalODMSession -from ming.base import Object - -from allura import model as M -from allura.lib import helpers as h -from allura.lib import utils -import six - -log = logging.getLogger('teamforge-import') - -''' - -http://help.collab.net/index.jsp?topic=/teamforge520/reference/api-services.html - -http://www.open.collab.net/nonav/community/cif/csfe/50/javadoc/index.html?com/collabnet/ce/soap50/webservices/page/package-summary.html - -''' - -options = None -s = None # security token -client = None # main api client -users = {} - -cj = CookieJar() -loggedInOpener = six.moves.urllib.request.build_opener(six.moves.urllib.request.HTTPCookieProcessor(cj)) - - -def make_client(api_url, app): -return Client(api_url + app + '?wsdl', location=api_url + app) - - -def main(): -global options, s, client, users -defaults = dict( -api_url=None, -attachment_url='/sf/%s/do/%s/', -default_wiki_text='PRODUCT NAME HERE', -username=None, -password=None, -output_dir='teamforge-export/'
(allura) 04/05: [#8539] add some pylint checks
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 468ed4636e05684ef43a3a970f99a540411d65d1 Author: Dave Brondsema AuthorDate: Wed Mar 20 17:10:45 2024 -0400 [#8539] add some pylint checks --- Allura/allura/command/base.py | 2 +- Allura/allura/lib/helpers.py | 2 +- Allura/allura/lib/patches.py | 2 +- Allura/allura/tests/functional/test_discuss.py | 3 +-- Allura/allura/websetup/bootstrap.py| 2 +- ruff.toml | 4 scripts/ApacheAccessHandler.py | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Allura/allura/command/base.py b/Allura/allura/command/base.py index 65b7c758e..de09018c9 100644 --- a/Allura/allura/command/base.py +++ b/Allura/allura/command/base.py @@ -87,7 +87,7 @@ class Command(command.Command, metaclass=MetaParserDocstring): return tg.config def basic_setup(self): -global log, M +global log, M # noqa: PLW0603 if self.args[0]: # Probably being called from the command line - load the config # file diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py index 5f5c41bdf..26d031446 100644 --- a/Allura/allura/lib/helpers.py +++ b/Allura/allura/lib/helpers.py @@ -32,7 +32,7 @@ import json import logging import string import random -import pickle as pickle +import pickle from hashlib import sha1 from datetime import datetime, timedelta from collections import defaultdict, OrderedDict diff --git a/Allura/allura/lib/patches.py b/Allura/allura/lib/patches.py index 7c6e416eb..964624d0b 100644 --- a/Allura/allura/lib/patches.py +++ b/Allura/allura/lib/patches.py @@ -29,7 +29,7 @@ import six _patched = False def apply(): -global _patched +global _patched # noqa: PLW0603 if _patched: return _patched = True diff --git a/Allura/allura/tests/functional/test_discuss.py b/Allura/allura/tests/functional/test_discuss.py index f87f4352d..100f9b276 100644 --- a/Allura/allura/tests/functional/test_discuss.py +++ b/Allura/allura/tests/functional/test_discuss.py @@ -426,8 +426,7 @@ class TestAttachment(TestDiscussBase): if 'attachment' in alink['href']: alink = str(alink['href']) return alink -else: -assert False, 'attachment link not found' +assert False, 'attachment link not found' def test_attach(self): r = self.app.post(self.post_link + 'attach', diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py index eadd141e9..21cfa6781 100644 --- a/Allura/allura/websetup/bootstrap.py +++ b/Allura/allura/websetup/bootstrap.py @@ -56,7 +56,7 @@ def bootstrap(command, conf, vars): REGISTRY.register(ew.widget_context, ew.core.WidgetContext('http', ew.ResourceManager())) -create_test_data = asbool(os.getenv('ALLURA_TEST_DATA', True)) +create_test_data = asbool(os.getenv('ALLURA_TEST_DATA', 'true')) # if this is a test_run, skip user project creation to save time make_user_projects = not test_run diff --git a/ruff.toml b/ruff.toml index 7da944339..4337590c5 100644 --- a/ruff.toml +++ b/ruff.toml @@ -33,6 +33,9 @@ lint.select = [ "G010", # logging.warn "T10", # debugger breakpoints "T20", # print() +"PLC", +"PLE", +"PLW", "FA", # future annotations (to ensure compatibility with `target-version`) ] @@ -57,6 +60,7 @@ lint.ignore = [ 'S324', # md5 & sha1 'S603', # subprocess 'S607', # partial path +'PLW2901', # loop var overwritten ] [lint.per-file-ignores] diff --git a/scripts/ApacheAccessHandler.py b/scripts/ApacheAccessHandler.py index 217e4ecf6..fc10499a1 100644 --- a/scripts/ApacheAccessHandler.py +++ b/scripts/ApacheAccessHandler.py @@ -52,7 +52,7 @@ def load_requests_lib(req): exec(compile(open(activate_this, "rb").read(), activate_this, 'exec'), {'__file__': activate_this}) # noqa: S102 except Exception as e: log(req, "Couldn't activate venv via {}: {}".format(activate_this, repr(e))) -global requests +global requests # noqa: PLW0603 import requests as requests_lib requests = requests_lib
(allura) 03/05: [#8539] add bandit checks
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit 0d48081e35daee8fc83f48dcad950e4a05459af7 Author: Dave Brondsema AuthorDate: Wed Mar 20 16:37:16 2024 -0400 [#8539] add bandit checks --- Allura/allura/command/script.py| 2 +- Allura/allura/command/taskd.py | 2 +- Allura/allura/config/middleware.py | 2 +- Allura/allura/controllers/rest.py | 2 +- Allura/allura/lib/decorators.py| 2 +- Allura/allura/lib/helpers.py | 2 +- Allura/allura/lib/import_api.py| 2 +- Allura/allura/lib/phone/nexmo.py | 4 ++-- Allura/allura/lib/plugin.py| 5 +++-- Allura/allura/lib/project_create_helpers.py| 2 +- Allura/allura/model/index.py | 2 +- Allura/allura/model/notification.py| 4 ++-- Allura/allura/scripts/trac_export.py | 6 +++--- .../allura/tests/functional/test_neighborhood.py | 7 ++- Allura/allura/tests/unit/phone/test_nexmo.py | 16 Allura/allura/websetup/bootstrap.py| 2 +- Allura/ldap-setup.py | 2 +- Allura/setup.py| 2 +- ForgeImporters/forgeimporters/base.py | 2 +- .../forgetracker/tests/unit/test_ticket_model.py | 2 +- fuse/accessfs.py | 2 +- ruff.toml | 22 +++--- scripts/ApacheAccessHandler.py | 2 +- scripts/changelog.py | 2 +- scripts/new_ticket.py | 2 +- scripts/wiki-copy.py | 4 ++-- 26 files changed, 63 insertions(+), 41 deletions(-) diff --git a/Allura/allura/command/script.py b/Allura/allura/command/script.py index 52e58b2fb..78edd8746 100644 --- a/Allura/allura/command/script.py +++ b/Allura/allura/command/script.py @@ -73,7 +73,7 @@ class ScriptCommand(base.Command): pr = cProfile.Profile() pr.enable() -exec(code, ns) +exec(code, ns) # noqa: S102 if self.options.profile: pr.disable() diff --git a/Allura/allura/command/taskd.py b/Allura/allura/command/taskd.py index 9d6c42c67..782c216cd 100644 --- a/Allura/allura/command/taskd.py +++ b/Allura/allura/command/taskd.py @@ -160,7 +160,7 @@ class TaskdCommand(base.Command): if self.restart_when_done: base.log.info('taskd pid %s restarting itself' % os.getpid()) -os.execv(sys.argv[0], sys.argv) +os.execv(sys.argv[0], sys.argv) # noqa: S606 class TaskCommand(base.Command): diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py index e481a1621..edf28a968 100644 --- a/Allura/allura/config/middleware.py +++ b/Allura/allura/config/middleware.py @@ -91,7 +91,7 @@ def make_app(global_conf: dict, **app_conf): class BeakerPickleSerializerWithLatin1(PickleSerializer): def loads(self, data_string): # need latin1 to decode py2 timestamps in py https://docs.python.org/3/library/pickle.html#pickle.Unpickler -return pickle.loads(data_string, encoding='latin1') +return pickle.loads(data_string, encoding='latin1') # noqa: S301 def _make_core_app(root, global_conf: dict, **app_conf): diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py index ef4ae4ca5..f077b3d40 100644 --- a/Allura/allura/controllers/rest.py +++ b/Allura/allura/controllers/rest.py @@ -251,7 +251,7 @@ class OAuthNegotiator: return AlluraOauth1Server(Oauth1Validator()) def _authenticate(self): -bearer_token_prefix = 'Bearer ' +bearer_token_prefix = 'Bearer ' # noqa: S105 auth = request.headers.get('Authorization') if auth and auth.startswith(bearer_token_prefix): access_token = auth[len(bearer_token_prefix):] diff --git a/Allura/allura/lib/decorators.py b/Allura/allura/lib/decorators.py index eaf8016f8..a0fecc1f4 100644 --- a/Allura/allura/lib/decorators.py +++ b/Allura/allura/lib/decorators.py @@ -142,7 +142,7 @@ def reconfirm_auth(func, *args, **kwargs): session.save() kwargs.pop('password', None) else: -request.validation.errors['password'] = 'Invalid password.' +request.validation.errors['password'] = 'Invalid password.' # noqa: S105 allowed_timedelta = timedelta(seconds=asint(config.get('auth.reconfirm.seconds', 60))) last_reconfirm = session.get('auth-reconfirm
(allura) branch master updated (9ebd2cba3 -> 0ca517797)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/allura.git from 9ebd2cba3 [#8538] add new get_object_from_id timeline helper method which tries to find an object from an allura_id new d75b31713 [#8539] upgrade ruff new 091228210 [#8539] remove old teamforge import script, which had lots of hardcoded specifics new 0d48081e3 [#8539] add bandit checks new 468ed4636 [#8539] add some pylint checks new 0ca517797 [#8539] code simplifications The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore |1 - .pre-commit-config.yaml|3 +- Allura/allura/command/base.py |2 +- Allura/allura/command/script.py|2 +- Allura/allura/command/taskd.py |2 +- Allura/allura/command/taskd_cleanup.py |4 +- Allura/allura/config/middleware.py |2 +- Allura/allura/controllers/project.py |2 +- Allura/allura/controllers/rest.py |4 +- Allura/allura/controllers/site_admin.py|2 +- Allura/allura/lib/decorators.py|2 +- Allura/allura/lib/helpers.py |4 +- Allura/allura/lib/import_api.py|2 +- Allura/allura/lib/patches.py |2 +- Allura/allura/lib/phone/nexmo.py |4 +- Allura/allura/lib/plugin.py|5 +- Allura/allura/lib/project_create_helpers.py|2 +- Allura/allura/lib/utils.py |2 +- Allura/allura/model/index.py |2 +- Allura/allura/model/notification.py|4 +- Allura/allura/scripts/trac_export.py |6 +- Allura/allura/tests/decorators.py |8 +- Allura/allura/tests/functional/test_discuss.py |3 +- .../allura/tests/functional/test_neighborhood.py | 11 +- .../tests/functional/test_personal_dashboard.py| 29 +- .../allura/tests/functional/test_user_profile.py | 17 +- Allura/allura/tests/model/test_project.py | 11 +- Allura/allura/tests/test_commands.py |4 +- Allura/allura/tests/test_helpers.py|5 +- Allura/allura/tests/test_tasks.py | 10 +- Allura/allura/tests/test_webhooks.py |5 +- Allura/allura/tests/unit/phone/test_nexmo.py | 16 +- Allura/allura/tests/unit/test_session.py | 28 +- Allura/allura/websetup/bootstrap.py|4 +- Allura/docs/getting_started/administration.rst | 11 - Allura/ldap-setup.py |2 +- Allura/setup.py|2 +- ForgeActivity/forgeactivity/main.py|2 +- .../tests/unit/test_root_controller.py |4 +- ForgeImporters/forgeimporters/base.py |2 +- ForgeImporters/forgeimporters/github/__init__.py |2 +- .../forgetracker/tests/unit/test_ticket_model.py |2 +- ForgeTracker/forgetracker/tracker_main.py |2 +- fuse/accessfs.py |2 +- requirements.txt |2 +- ruff.toml | 39 +- scripts/ApacheAccessHandler.py |4 +- scripts/changelog.py |2 +- scripts/new_ticket.py |2 +- scripts/teamforge-import.py| 1126 scripts/wiki-copy.py |4 +- 51 files changed, 151 insertions(+), 1269 deletions(-) delete mode 100644 scripts/teamforge-import.py
(allura) 01/05: [#8539] upgrade ruff
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git commit d75b31713a6ad879611635560dc4b0dbbefa272c Author: Dave Brondsema AuthorDate: Tue Mar 19 18:08:38 2024 -0400 [#8539] upgrade ruff --- .pre-commit-config.yaml | 2 +- requirements.txt| 2 +- ruff.toml | 10 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e3a5168f..7d3eea1f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,7 +80,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.11 + rev: v0.3.3 hooks: - id: ruff types: [python] diff --git a/requirements.txt b/requirements.txt index 471b477ba..656376a0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -201,7 +201,7 @@ requests==2.31.0 # requests-oauthlib requests-oauthlib==1.3.1 # via -r requirements.in -ruff==0.1.13 +ruff==0.3.2 # via -r requirements.in setproctitle==1.3.3 # via -r requirements.in diff --git a/ruff.toml b/ruff.toml index b2e7c55cb..2bfa1ec9e 100644 --- a/ruff.toml +++ b/ruff.toml @@ -16,10 +16,10 @@ # under the License. line-length = 119 -show-source = true +output-format = "full" target-version = "py38" -select = [ +lint.select = [ # all flake8 & pep8 (except 'ignore' below) "F", "E", @@ -29,12 +29,14 @@ select = [ "ISC001", # NIC001 in flake8 codes "B", "PGH", # https://github.com/pre-commit/pygrep-hooks +"S307", # eval +"G010", # logging.warn "T10", # debugger breakpoints "T20", # print() "FA", # future annotations (to ensure compatibility with `target-version`) ] -ignore = [ +lint.ignore = [ 'F401', # Imported but unused, 'F811', # Redefinition of unused 'F841', # Assigned to but never used @@ -47,7 +49,7 @@ ignore = [ 'B905', # zip(strict=True) would be good, but need to closely evaluate all existing cases first ] -[per-file-ignores] +[lint.per-file-ignores] '__init__.py' = ['F403'] # import * '**/{alluratest,tests}/*' = [ 'B011', # assert False
(allura) branch master updated: keep flash messages more visible
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new d3c5f4b24 keep flash messages more visible d3c5f4b24 is described below commit d3c5f4b245140650e64435e16e1c5ff34a046e60 Author: Dave Brondsema AuthorDate: Fri Mar 15 13:07:15 2024 -0400 keep flash messages more visible - 'sticky' now means persistent too, since a lot of calling code uses sticky - error classes are always persistent - click to hide now applies only on "X" target --- Allura/allura/nf/allura/css/site_style.css | 12 +++- Allura/allura/public/nf/js/jquery.notify.js | 16 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css index b2ca323bc..b2de89e91 100644 --- a/Allura/allura/nf/allura/css/site_style.css +++ b/Allura/allura/nf/allura/css/site_style.css @@ -626,7 +626,7 @@ img.nav-logo { border: 2px solid #000; margin-bottom: 1em; color: #fff; - cursor: pointer; + position: relative; } .message a { color: white; @@ -654,6 +654,16 @@ img.nav-logo { .message.warning header { text-shadow: none; } +#messages .message-closer { + position: absolute; + top: 0; + right: 3px; + font-size: 30px; + line-height: 1; + width: 21px; + text-align: center; + cursor: pointer; +} .no-js #messages { margin: 0 auto; diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index c01220726..2c1365ccc 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -60,11 +60,12 @@ } function displayNotification(el, o){ -var selector = '.' + o.newClass + '.' + o.messageClass; -$(selector).addClass(o.activeClass); -$(selector).fadeIn(500); -if (!$(selector).hasClass(o.persistentClass)) { -var timer = $(selector).attr('data-timer') || o.timer; +var $el = $(el); +$el.addClass(o.activeClass); +$el.prepend('×'); +$el.fadeIn(500); +if (!$el.hasClass(o.persistentClass) && !$el.hasClass(o.stickyClass) && !$el.hasClass('error')) { +var timer = $el.attr('data-timer') || o.timer; setTimeout(function() { closer(el, o); }, timer); @@ -83,8 +84,8 @@ } $('.' + o.messageClass, self).addClass(o.newClass); var selector = '.' + o.newClass + '.' + o.messageClass; -$('body').on("click", selector, function(e) { - closer(this, o); +$('body').on("click", selector + ' .message-closer', function(e) { + closer(this.parentNode, o); }); displayNotification($(selector).get(0), o); }); @@ -142,7 +143,6 @@ activeClass: 'notify-active', inactiveClass: 'notify-inactive', messageClass: 'message', -closeIcon: '' }; }(jQuery));
(allura) branch master updated: [#8537] small update to notifications function to set active
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new 15ff11bf1 [#8537] small update to notifications function to set active 15ff11bf1 is described below commit 15ff11bf1efc622cb599c22d863de24d881d5488 Author: Guillermo Cruz AuthorDate: Mon Mar 11 14:02:49 2024 -0600 [#8537] small update to notifications function to set active --- Allura/allura/public/nf/js/jquery.notify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index e8d700b0f..c01220726 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -61,7 +61,7 @@ function displayNotification(el, o){ var selector = '.' + o.newClass + '.' + o.messageClass; -$(selector).removeClass(o.newClass).addClass(o.activeClass); +$(selector).addClass(o.activeClass); $(selector).fadeIn(500); if (!$(selector).hasClass(o.persistentClass)) { var timer = $(selector).attr('data-timer') || o.timer;
(allura) branch master updated: add active class to notification messages
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/master by this push: new ba9955669 add active class to notification messages ba9955669 is described below commit ba9955669ca6b49ee8e6a0aaede5322e2894e7d3 Author: Guillermo Cruz AuthorDate: Mon Mar 11 11:09:43 2024 -0600 add active class to notification messages --- Allura/allura/public/nf/js/jquery.notify.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index 9ad8b8916..e8d700b0f 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -61,6 +61,7 @@ function displayNotification(el, o){ var selector = '.' + o.newClass + '.' + o.messageClass; +$(selector).removeClass(o.newClass).addClass(o.activeClass); $(selector).fadeIn(500); if (!$(selector).hasClass(o.persistentClass)) { var timer = $(selector).attr('data-timer') || o.timer;
(allura) branch gc/8537 updated: fixup! fixup! fixup! [#8537] moved g analytics further down the page
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8537 by this push: new f6c0fe853 fixup! fixup! fixup! [#8537] moved g analytics further down the page f6c0fe853 is described below commit f6c0fe85305c5cb10c71e40a19685d0135ad8e54 Author: Guillermo Cruz AuthorDate: Thu Mar 7 08:30:07 2024 -0700 fixup! fixup! fixup! [#8537] moved g analytics further down the page --- Allura/allura/public/nf/js/jquery.notify.js | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index 6e2b938d0..59297c56f 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -96,6 +96,17 @@ return str.replace(//g, '>'); } +function displayNotification(o){ +var selector = '.' + o.newClass + '.' + o.messageClass; +$(selector).fadeIn(500); +if (!$(selector).hasClass(o.persistentClass)) { +var timer = $(selector).attr('data-timer') || o.timer; +setTimeout(function() { +closer($(selector), o); +}, timer); +} +} + $.fn.notifier = function(options){ var opts = $.extend({}, $.fn.notify.defaults, options); return $(this).each(function() { @@ -106,18 +117,13 @@ $(self).css(o.scrollcss); }); } + $('.' + o.messageClass, self).addClass(o.newClass); var selector = '.' + o.newClass + '.' + o.messageClass; $('body').on("click", selector, function(e) { closer(this, o); }); -$(selector).fadeIn(500); -if (!$(selector).hasClass(o.persistentClass)) { -var timer = $(selector).attr('data-timer') || o.timer; -setTimeout(function() { -closer($(selector), o); -}, timer); -} +displayNotification(o); }); }; @@ -146,6 +152,7 @@ } var html = tmpl(o.tmpl, o); $(this).append(html); +displayNotification(o); } else { if (window.console) { //#JSCOVERAGE_IF window.console
(allura) branch gc/8537 updated: fixup! fixup! [#8537] moved g analytics further down the page
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8537 by this push: new 7460c8d76 fixup! fixup! [#8537] moved g analytics further down the page 7460c8d76 is described below commit 7460c8d762420e204eef06c6bed6f50c3b361a0e Author: Guillermo Cruz AuthorDate: Tue Mar 5 14:34:23 2024 -0700 fixup! fixup! [#8537] moved g analytics further down the page --- Allura/allura/public/nf/js/jquery.notify.js | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index 7b4b4bb76..6e2b938d0 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -111,6 +111,13 @@ $('body').on("click", selector, function(e) { closer(this, o); }); +$(selector).fadeIn(500); +if (!$(selector).hasClass(o.persistentClass)) { +var timer = $(selector).attr('data-timer') || o.timer; +setTimeout(function() { +closer($(selector), o); +}, timer); +} }); };
(allura) branch gc/8537 updated: fixup! [#8537] moved g analytics further down the page
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8537 by this push: new c29f084ca fixup! [#8537] moved g analytics further down the page c29f084ca is described below commit c29f084ca0ca9425e0711492bfc14819ee74aa51 Author: Guillermo Cruz AuthorDate: Mon Mar 4 10:27:19 2024 -0700 fixup! [#8537] moved g analytics further down the page --- .eslintrc-es5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc-es5 b/.eslintrc-es5 index 493b774e1..880f708b3 100644 --- a/.eslintrc-es5 +++ b/.eslintrc-es5 @@ -18,7 +18,7 @@ // disallow use of eval()-like methods "no-implied-eval": 2, // disallow this keywords outside of classes or class-like objects -"no-invalid-this": 2, +"no-invalid-this": 0, // disallow creation of functions within loops "no-loop-func": 2, // disallow declaring the same variable more then once
(allura) 01/01: [#8537] moved g analytics further down the page
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git commit 63f7477d0286668be705c5602f0f889ca85ea26b Author: Guillermo Cruz AuthorDate: Thu Feb 22 16:59:44 2024 -0700 [#8537] moved g analytics further down the page --- Allura/allura/public/nf/js/jquery.notify.js | 5 - Allura/allura/templates/jinja_master/master.html| 2 +- Allura/allura/templates_responsive/jinja_master/master.html | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index 7e81ff58f..7b4b4bb76 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -107,7 +107,10 @@ }); } $('.' + o.messageClass, self).addClass(o.newClass); -scanMessages(self, o); +var selector = '.' + o.newClass + '.' + o.messageClass; +$('body').on("click", selector, function(e) { + closer(this, o); +}); }); }; diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html index 19cb43ca1..95ee01e16 100644 --- a/Allura/allura/templates/jinja_master/master.html +++ b/Allura/allura/templates/jinja_master/master.html @@ -72,7 +72,6 @@ {% endblock %} {% block head_bottom -%} {% endblock %} -{{ g.analytics.display() }} @@ -197,5 +196,6 @@ }); }); +{{ g.analytics.display() }} diff --git a/Allura/allura/templates_responsive/jinja_master/master.html b/Allura/allura/templates_responsive/jinja_master/master.html index 5d28d00dc..76c470f92 100644 --- a/Allura/allura/templates_responsive/jinja_master/master.html +++ b/Allura/allura/templates_responsive/jinja_master/master.html @@ -72,7 +72,6 @@ {% block head %} {% endblock %} -{{ g.analytics.display() }} {% block head_bottom -%} {% endblock %} @@ -163,5 +162,7 @@ {% if flash %} {{ flash | safe }}{# comes from flash.static_template in root.py and escaped by tg.flash allow_html setting #} {% endif %} +{{ g.analytics.display() }} +
(allura) branch gc/8537 updated (e3f0a2462 -> 63f7477d0)
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a change to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git discard e3f0a2462 fixup! [#8537] moved g analytics further down the page discard 86b19c7ab [#8537] moved g analytics further down the page add e80a4cae6 [#8536] use Markup's own interpolation add 0b90f747e [#8536] remove old unused oembed templates add 5fb7c3eca [#8536] move/improve |safe usage add f0226ee0d [#8536] remove unnecessary |safe usages add 0917b82b7 [#8536] improve safety add cc9a338fc [#8536] more move/improve |safe add 63f12b9a7 [#8536] don't use jinja for site notifications; add autoescape add b5333e288 [#8536] use h.clean_html and |safe_html add b3827038c bump cryptography 42.0.4 -> 42.0.5 new 63f7477d0 [#8537] moved g analytics further down the page This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e3f0a2462) \ N -- N -- N refs/heads/gc/8537 (63f7477d0) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Allura/allura/app.py | 7 ++--- Allura/allura/config/app_cfg.py| 1 + Allura/allura/controllers/search.py| 2 +- .../allura/ext/admin/templates/project_groups.html | 2 +- .../allura/ext/admin/templates/project_trove.html | 2 +- .../templates/sections/projects.html | 4 +-- .../user_profile/templates/sections/projects.html | 2 +- Allura/allura/lib/app_globals.py | 19 + Allura/allura/lib/diff.py | 3 ++- Allura/allura/lib/helpers.py | 31 +++--- Allura/allura/lib/search.py| 2 +- Allura/allura/lib/utils.py | 10 +++ Allura/allura/lib/widgets/forms.py | 30 ++--- Allura/allura/lib/widgets/search.py| 6 +++-- Allura/allura/public/nf/js/allura-base.js | 2 +- Allura/allura/tasks/mail_tasks.py | 2 +- Allura/allura/templates/jinja_master/master.html | 6 ++--- .../templates/jinja_master/sidebar_menu.html | 2 +- .../templates/jinja_master/theme_macros.html | 2 +- .../templates/neighborhood_project_list.html | 2 +- Allura/allura/templates/oauth_applications.html| 4 +-- Allura/allura/templates/oauth_authorize.html | 2 +- Allura/allura/templates/oembed/__init__.py | 16 --- Allura/allura/templates/oembed/generic.html| 23 Allura/allura/templates/oembed/html_tpl.html | 25 - Allura/allura/templates/oembed/link.html | 26 -- Allura/allura/templates/oembed/link_opera.html | 27 --- Allura/allura/templates/oembed/link_twitter.html | 29 Allura/allura/templates/oembed/photo.html | 25 - Allura/allura/templates/project_list.html | 4 --- Allura/allura/templates/repo/barediff.html | 2 +- Allura/allura/templates/repo/diff.html | 2 +- Allura/allura/templates/repo/merge_request.html| 2 +- Allura/allura/templates/user_prefs.html| 2 +- Allura/allura/templates/widgets/include.html | 2 +- Allura/allura/templates/widgets/lightbox.html | 2 +- Allura/allura/templates/widgets/post_widget.html | 4 +-- .../templates_responsive/jinja_master/master.html | 6 ++--- .../jinja_master/sidebar_menu.html | 2 +- .../jinja_master/theme_macros.html | 2 +- Allura/allura/tests/test_globals.py| 1 + Allura/allura/tests/test_helpers.py| 24 + ForgeActivity/forgeactivity/templates/macros.html | 2 +- .../templates/blog_widgets/preview_post.html | 2 +- .../templates/blog_widgets/view_post.html | 2 +- ForgeChat/forgechat/templates/chat/day.html| 2 +- .../templates/discussion_widgets/forum_header.html | 2 +- .../templates/discussionforums/admin_forums.html | 2 +- ForgeTracker/forgetrack
(allura) branch gc/8537 updated: fixup! [#8537] moved g analytics further down the page
This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8537 in repository https://gitbox.apache.org/repos/asf/allura.git The following commit(s) were added to refs/heads/gc/8537 by this push: new e3f0a2462 fixup! [#8537] moved g analytics further down the page e3f0a2462 is described below commit e3f0a24626dd6dc75faa885b404594c435c18e42 Author: Guillermo Cruz AuthorDate: Fri Mar 1 14:27:40 2024 -0700 fixup! [#8537] moved g analytics further down the page --- Allura/allura/public/nf/js/jquery.notify.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Allura/allura/public/nf/js/jquery.notify.js b/Allura/allura/public/nf/js/jquery.notify.js index 7e81ff58f..7b4b4bb76 100644 --- a/Allura/allura/public/nf/js/jquery.notify.js +++ b/Allura/allura/public/nf/js/jquery.notify.js @@ -107,7 +107,10 @@ }); } $('.' + o.messageClass, self).addClass(o.newClass); -scanMessages(self, o); +var selector = '.' + o.newClass + '.' + o.messageClass; +$('body').on("click", selector, function(e) { + closer(this, o); +}); }); };