Instagram Feed Block provides a configurable Drupal block for displaying Instagram Business or Creator account posts using the Instagram Graph API. It supports default and per-block account settings, secure token selection through the Key module, Gutenberg block configuration, account-scoped hashtag feeds, post limits, date filtering, caching, and responsive front-end display.

This module is different then the existing Instagram blocks since allows for global account configuration with the option to add different instagram accounts on a block level. This allows for multiple instagram accounts to be used. The module also provides the option to filter the feed by date and hashtag.

Recent security updates:
Key module for storing the API tokens for security.
Improved security handling for Instagram feed API requests.
Added stronger validation for Instagram Business Account IDs, hashtags, dates, post limits, media source, API version, cache lifetime, and selected Key module token keys.
Sanitized remote Instagram text before caching and rendering.
Continued validating Instagram media and permalink URLs before output.
Prevented access tokens from being appended directly to pagination URLs.
Reduced API/token error logging detail to avoid exposing sensitive values.
Replaced remaining runtime service lookups with dependency injection where practical.
Updated Composer constraints for Drupal 10.1, 11, 12, and maintained Key module versions.
Verified PHP syntax, Composer metadata, and whitespace checks.

Project link

https://www.drupal.org/project/instagram_feed_block/

Comments

jbaum_13 created an issue. See original summary.

avpaderno’s picture

Thank you for applying!

Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.

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 enable GitLab CI for the project and fix the PHP_CodeSniffer errors/warnings it reports.
  • 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 will not be changed by this application; once this application is closed, you will be able to change the project status from Not covered to Opt into security advisory coverage. This is possible only 14 days after the project is created.

    Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
  • Only the person who created the application will get the permission to opt projects into security advisory coverage. No other person will get the same permission from the same application; that applies also to co-maintainers/maintainers of the project used for the application.
  • 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 project moderator before posting the first comment on newly created applications. Project moderators 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.

vishal.kadam’s picture

Issue summary: View changes
vishal.kadam’s picture

Title: 1.0.x Instagram Feed Block » [1.0.x] Instagram Feed Block
Status: Needs review » Needs work

1. FILE: README.md

The README file is missing the required section - Configuration.

2. FILE: instagram_feed_block.info.yml

package: Custom

Custom is not a package value used for projects hosted on drupal.org. That is not a mandatory value, and it can be omitted.

3. FILE: src/Form/InstagramFeedSettingsForm.php

ConfigFormBase::__construct() requires two parameters. See the change record. The module cannot be compatible with Drupal releases before 10.2.0. It needs to require at least Drupal 10.2.

With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.

    $form['image_toolkit'] = [
      '#type' => 'radios',
      '#title' => $this->t('Select an image processing toolkit'),
      '#config_target' => 'system.image:toolkit',
      '#options' => [],
    ];

Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
For this change, it is necessary to require at least Drupal 10.3, but that is not an issue, since Drupal 10.2.x is no longer supported.

4. FILE: src/Plugin/Block/InstagramFeedBlock.php

 * @Block(
 *   id = "instagram_feed_block",
 *   admin_label = @Translation("Instagram Feed Block"),
 *   category = @Translation("Social")
 * )

Projects that are compatible with Drupal 10 or higher versions should use attributes instead of annotations. This means requiring at least Drupal 10.3, but this is not an issue, considering which Drupal core versions are nowadays supported.

cmlara’s picture

ConfigFormBase::__construct() requires two parameters. See the change record. The module cannot be compatible with Drupal releases before 10.2.0. It needs to require at least Drupal 10.2.

While the part about needing to provide an additional argument to the parent constructor in D11 is accurate the part about being forced to support no less than 10.2 due to ConfigFormBase::__construct() is false.

PHP does not require constructors to be covariant with their parents. Additionally PHP supports providing more arguments than the method requires, thus older releases can still function when calling parent::__construct()with two arguments when only one is required.

https://git.drupalcode.org/project/s3fs/-/blob/1cde6aa5df360ac96aaa9a8dd... Is a sample from one of my own modules (that has published support back to D8.8, yes that’s possible, even easy) including an extra BC of ensuring the constructor was provided the parameter (using the acceptable exception of calling \Druapal::service() in a constructor for BC) in case the form had been extended by a 3rd party.

The above doesn’t change information related about other requirements and possible reasons to increase versions. This Information is posted primarily to ensure reviewers are compelled to acknowledge inaccurate comments and to ensure newer developers are not lead astray for the next time they encounter similar BC challenges (this is a very common situation for maintainers to encounter that rarely, if ever, requires dropping core version support).

avpaderno’s picture

For a module that aims to be compatible with Dupal 10.1.x and Drupal 11.x, the following code cannot be used.

  /**
   * Constructs the settings form.
   */
  public function __construct(
    ConfigFactoryInterface $config_factory,
    protected ?KeyRepositoryInterface $keyRepository = NULL,
  ) {
    parent::__construct($config_factory);
  }

The previous comment just avoids mentioning a backward-compatible option which, IMO, does not make sense for a project which was created on April 29, 2026.
Neither Drupal 10.1.x nor Drupal 10.2.x are supported; requiring a supported Drupal 10.x branch makes more sense than rewriting code for a new project to be backward compatible with Drupal 10.2.x.

cmlara’s picture

The previous comment just avoids mentioning a backward-compatible option

I would contend it implies there is not any backwards compatible option and could use a re-word. Only @vishal.kadam can tell us what they intended it to mean.

parent::__construct($config_factory, $typed_data_manager);

would be compatible with all releases from 8.8 through current 11.4. That isn't even a BC layer, that is just natural PHP.

It would likely have been better to say "The config form is not compatible with Drupal 11 as not all required arguments have been passed to the parent constructor" if their intention was sole to call out the missing parent argument.

As noted I made no statement regarding the validity of setting a higher level version restriction for other reasons (that is out of my scope as I do not know the applicants clients and I can not say with any certainty that they do not have clients on an Long Term Support (third party) release of D10.1).

avpaderno’s picture

parent::__construct($config_factory, $typed_data_manager); is not even sufficient to fix the code which (as for project core requirements) should run in Drupal 10.1.x and Drupal 11.x.

ConfigFormBase::__construct() requires two parameters. is correct for the project core requirements. It does not need to explicitly say in which Drupal versions are two parameters required, considering the comment also gives a link to the change record.

vishal.kadam’s picture

My intention was to highlight that current implementation is not compatible with defined core_version_requirement (^10.1) due to additional constructor argument.