- Issue created by @cesarmsfelipe
- 🇮🇳India vishal.kadam Mumbai
Thank you for applying!
Please read Review process for security advisory coverage: What to expect → for more details and Security advisory coverage application checklist → to understand what reviewers look for. Tips for ensuring a smooth review → gives some hints for a smoother review.
The important notes are the following.
- If you have not done it yet, you should run
phpcs --standard=Drupal,DrupalPractice
on the project, which alone fixes most of what reviewers would report. - For the time this application is open, only your commits are allowed.
- The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
- We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.
To the reviewers
Please read How to review security advisory coverage applications → , Application workflow → , What to cover in an application review → , and Tools to use for reviews → .
The important notes are the following.
- It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
- Reviewers should show the output of a CLI tool → only once per application.
- It may be best to have the applicant fix things before further review.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues → .
- If you have not done it yet, you should run
- Status changed to Needs work
9 months ago 8:07am 2 May 2024 - 🇮🇳India rushiraval
Fix the phpcs Error :
FILE: /sso_connector/README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 13 WARNINGS AFFECTING 13 LINES
------------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 300 characters
22 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
24 | WARNING | [ ] Line exceeds 80 characters; contains 150 characters
30 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
34 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
36 | WARNING | [ ] Line exceeds 80 characters; contains 123 characters
37 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
38 | WARNING | [ ] Line exceeds 80 characters; contains 201 characters
39 | WARNING | [ ] Line exceeds 80 characters; contains 138 characters
45 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
57 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
58 | WARNING | [ ] Line exceeds 80 characters; contains 186 characters
64 | WARNING | [ ] Line exceeds 80 characters; contains 100 characters
64 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------FILE: /sso_connector/sso_connector.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
--------------------------------------------------------------------------------FILE: /sso_connector/src/tests/src/Kernel/SsoTokenTest.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
11 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\KernelTests\KernelTestBase.
15 | WARNING | [x] Unused use statement
74 | ERROR | [x] Whitespace found at end of line
76 | ERROR | [x] Whitespace found at end of line
93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
94 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
95 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
96 | ERROR | [x] Expected 1 blank line before function; 0 found
98 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
| | with use statements
139 | ERROR | [x] Expected 1 blank line after function; 2 found
142 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------Time: 1.17 secs; Memory: 10MB
- 🇮🇳India vishal.kadam Mumbai
@Rushikesh Raval Please include the command that was used, along with its arguments.
- 🇮🇳India vishal.kadam Mumbai
1.
1.0.0
andmain
are wrong names for a branch. Release branch names always end with the literal .x as described in Release branches → . The only exception is for the main branch, which is actually not fully supported on drupal.org and should be avoided.2. FILE: sso_connector.module
/** * Implements hook_entity_update(). * * { @inheritdoc } */ function sso_connector_entity_update(EntityInterface $entity) {
Remove { @inheritdoc } from the doc comment. {@inheritdoc} is used if you are overriding or implementing a method from a base class or interface.
/** * @file * Contains hooks and callbacks for the SSO Connector module. */
The usual description for a .module file is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.
- Status changed to Needs review
9 months ago 10:22am 2 May 2024 - 🇪🇸Spain cesarmsfelipe
Thank you both for the feedback, I have solved all the phpcs requirements, deleted wrong branches and fixed the standard comments. Let me know if there is something else to change or improve.
- 🇮🇳India rushiraval
Rest looks fine to me.
Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.
- Status changed to Needs work
9 months ago 7:44am 4 May 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
I did not make a complete review, but the following point needs to be fixed.
Projects hosted on drupal.org are licensed under GPLv2+, the same license used from Drupal core. If you are licensing a project under a different license, it cannot he hosted on drupal.org. More details are given in Drupal Git Contributor Agreement & Repository Usage Policy → .
All code that is a derivative work of Drupal (typically PHP code, including but not limited to: core patches, modules, themes, etc) committed to Drupal.org's git repository is licensed as GPL version 2.0 and later (official short identifier: “GPL-2.0-or-later”). This means that the code is licensed under GPLv2, and there exists an option that allows downstream recipients to re-license the code to be under a later version of GPL.
All code submitted to the repository that is a derivative work of Drupal must be and it will automatically be redistributed as GPL-2.0-or-later.
Any code that is not GPL-2.0-or-later compatible or granted an exception by the LWG should not be added to the repository and when found will be removed.
For code licensed under GPLv3, see I want to release my work under GPL version 3 or under GPL version 2-only. Can I do so and host it on Drupal.org? →
No. You can release your work under any GPL version 2 or later compatible license. However, you may only check it into Drupal's Git repositories if you are releasing it under the same license as Drupal itself, that is GPL version 2 or later, allowing users to choose between the terms of the GPL version 2 or the terms in any new versions as updated by the FSF. If you are unable or unwilling to do so, do not check it into a Drupal Git repository.
- Status changed to Needs review
9 months ago 10:13am 4 May 2024 - 🇪🇸Spain cesarmsfelipe
@apaderno Thanks for your review, I have changed the license using the drupalcode template for version 2.
- Status changed to RTBC
8 months ago 7:23am 14 May 2024 - 🇮🇳India vishal.kadam Mumbai
Changes looks fine to me.
Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.
- 🇪🇸Spain cesarmsfelipe
Hi @vishal.kadam, how is the process going, is it normal to take so long? Sorry for being insistent, this is the first time I apply for this review process.
- 🇮🇳India vishal.kadam Mumbai
Yes, it is normal. Sometimes the application queue experiences a backlog, and applications may sit in the queue for months before getting reviewed.
- Status changed to Needs work
8 months ago 10:25am 11 June 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- The following points are just a start and don't necessarily encompass all of the changes that may be necessary
- A specific point may just be an example and may apply in other places
- A review is about code that doesn't follow the coding standards, contains possible security issue, or does not correctly use the Drupal API; the single points are not ordered, not even by importance
src/Controller/SsoController.php
The parent class has already properties and methods for the logger factory, the entity type manager, and the configuration object. There is no need to re-define properties for the same purpose; instead, the parent class methods should be used.
src/Authentication/Provider/CustomCookie.php
The
Drupal\user\Authentication\Provider\Cookie
class is not part of the public API. It cannot be used as parent class for a contributed module.src/EventSubscriber/CheckIdPSessionSubscriber.php
if ($validationResult['valid']) { $this->logger->info('Token validation successful.', ['token' => $token]); $event->setResponse(new TrustedRedirectResponse($referer . '/from-idp?token=' . $token)); }
$this->logger->info('Redirecting to IdP for authentication.', ['url' => $idpUrl]);
There isn't any placeholder for
token
norurl
.+1 👍🏻 for implementing tests.
- Status changed to Needs review
7 months ago 2:55pm 14 June 2024 - 🇪🇸Spain cesarmsfelipe
Thank you for your review and your time @apaderno, I correct the errors you have reported and I am always open to suggestions that can improve performance and security.
- 🇮🇳India vishal.kadam Mumbai
I am changing priority as per Issue priorities → .
- 🇪🇸Spain cesarmsfelipe
Should it be in Reviewed and tested by the community? @vishal.kadam
- 🇮🇳India vishal.kadam Mumbai
I am changing priority as per Issue priorities → .
- Status changed to Needs work
5 months ago 3:22pm 28 August 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
I apologize I was not clear in my previous comment: The class constructor needs to call
setLoggerFactory()
.src/Form/IdpConfigForm.php
/** * Constructs a new CheckIdPSessionSubscriber object. * * @param \Drupal\sso_connector\Services\UserSyncServiceInterface $user_sync * The synchronization users service. */ public function __construct(UserSyncServiceInterface $user_sync) { $this->userSync = $user_sync; }
The constructor is not calling the parent class' constructor.
sso_connector.info.yml
core_version_requirement: ^9 || ^10 || ^11
Given the changes in
ConfigFormBase
, the module cannot be compatible with all those Drupal releases. (In particular, see the changes to the constructor between Drupal 9.x and Drupal 10.x.) - Status changed to Needs review
5 months ago 10:27pm 28 August 2024 - 🇪🇸Spain cesarmsfelipe
Thank you for the feedback. I have made the necessary changes as you suggested:
IdpConfigForm Constructor: I have updated the constructor to call the parent class's constructor and included the setLoggerFactory() method to ensure proper initialization.
sso_connector.info.yml: I have reviewed and adjusted the core_version_requirement.
Please let me know if there are any further adjustments needed.
- 🇮🇹Italy apaderno Brescia, 🇮🇹
ConfigFormBase::__construct()
requires two parameters. - 🇪🇸Spain cesarmsfelipe
Hi @avpaderno sorry I thought it wasn't necessary as it is null setted by default in the configFormBase.
However, I have added it, thanks for the feedback. - 🇮🇹Italy apaderno Brescia, 🇮🇹
It has a default value in Drupal 10, but Drupal 10 will trigger a deprecation error.
public function __construct(ConfigFactoryInterface $config_factory, $typedConfigManager = NULL) { $this->setConfigFactory($config_factory); if (!$typedConfigManager instanceof TypedConfigManagerInterface) { $type = get_debug_type($typedConfigManager); @trigger_error("Passing {$type} to the \$typedConfigManager parameter of ConfigFormBase::__construct() is deprecated in drupal:10.2.0 and must be an instance of \\Drupal\\Core\\Config\\TypedConfigManagerInterface in drupal:11.0.0. See https://www.drupal.org/node/3404140", E_USER_DEPRECATED); } }
Furthermore, in Drupal 11, that parameter does not have any default value.
- Assigned to apaderno
- Status changed to RTBC
5 months ago 2:01pm 30 August 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
Thank you for your contribution and for your patience with the review process!
I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.
These are some recommended readings to help you with maintainership:
- Dries → ' post on Responsible maintainers
- Maintainership →
- Git version control system →
- Issue procedures and etiquette →
- Maintaining and responding to issues for a project →
- Release naming conventions → .
You can find more contributors chatting on Slack → or IRC → in #drupal-contribute. So, come hang out and stay involved → !
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review → . I encourage you to learn more about that process and join the group of reviewers.I thank the dedicated reviewers as well.
- Status changed to Fixed
5 months ago 2:02pm 30 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.