- 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
about 2 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
about 2 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
about 2 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
about 2 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
about 1 month 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
15 days 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
12 days 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.