ComputerMinds.co.uk: Block spam by alphabet
Fighting spam is an ongoing arms race. There will always be nefarious attempts to post unwanted content onto websites, that's just the nature of the global internet nowadays, but can we keep ahead of it? Some techniques are complex, maybe using AI / natural language processing, but there are also quite simple opportunities to reject spam.
We had a lot of contact requests come into our site that used the Cyrillic script - which is used for the Russian language. (привет!) Realistically we're very unlikely to treat any request that comes to us in Cyrillic as something worth responding to. We're a UK web agency with most of our clients based in the UK, and whilst we do work with clients outside the UK, and for projects using languages other than English, we can afford to ignore any requests made to us in a language we don't usually read. Given that, we can immediately block a large proportion of the spam requests by simply detecting what alphabet they look to have been written in. Most of this will be Russian, because so much spam comes through Russia.
Drupal makes it easy for us to add an extra validation handler to our contact form with a form alter hook. We could then get on with creating custom logic to check whether submissions contained too much Cyrillic text. We needed to account for a few things:
How much Cyrillic content is there, in comparison to content from the Latin alphabet (a-z)?
Although much of the unwanted content was using Cyrillic, we realised content in anything other than the Latin alphabet could probably be rejected in the same way. We're just not likely to do much business with people who can't contact us in English, let alone in an alphabet we can't read.
How much is too much?
We will happily accept some amount of Cyrillic text in a contact request - for example, if someone is explaining about spam they are receiving, or asking to add some translations to a site.
Ignore links and HTML tags, since those are written using a-z characters from the Latin alphabet.
We've also seen a lot of spam containing links formatted in an unusual format which we could strip:
[url=http...]...[/url]
Ignore whitespace and punctuation, to some extent.
We're going to end up using some regular expressions from PHP, so we can make use of its support for matching character scripts. For example,
/[^\p{Common}\p{Latin}]/u
will match any character that is NOT in either of the 'common' (punctuation etc) or Latin sets of characters.- We decided to ignore the potential for characters which are defined by multiple bytes (like emojis 👀) to interfere with calculating the proportion of non-Latin text. There are rarely that many of them in a message ... and pragmatically, do we really want to be doing business with people communicating using so many emojis?? (This is only for our website's contact form, they can always flood us with emojis later! 😄)
How can we best guide genuine leads to contact us more appropriately?
Drupal allows us to set the error message when failing form validation. We would quite like to advise real human beings who want to pay us money for our services, how best to do that!
All these things boiled down to a relatively simple form validation callback, that is just stuffed with a few bits of code that are relatively unusual, such as those regex script classes:
So now users see this error message if they attempt to contact us using too much Cyrillic:
This stops the unwanted messages coming through, whilst helping real users understand how to contact us more appropriately, should they really need to. Thankfully we now get very little spam coming through our contact page!
The Drop Times: A Global Celebration for Drupal
Dear Readers,
On January 15, the Drupal community will mark a historic milestone with the launch of Drupal CMS 1.0, coinciding with Drupal’s 24th anniversary. Over 40 community-hosted parties are planned globally, along with a virtual celebration for those unable to attend in person. This event highlights over two decades of innovation and collaboration within the Drupal ecosystem.
Drupal CMS represents a significant advancement in open-source content management, offering a fully composable platform designed for developers, marketers, and site builders. With a user-centric design, enterprise-grade tools, and unparalleled flexibility, it enables the creation of dynamic and powerful digital experiences. Its low-code/no-code features and seamless integration with marketing tools make it an accessible and versatile solution for organizations of all sizes.
The launch celebrates the creativity and dedication of the global Drupal community. Participants are encouraged to share innovative contributions, such as artwork, videos, or performances, on Slack (#drupal-cms-launch), with the most creative entries rewarded during a livestream event. This milestone is both a testament to Drupal’s legacy and a showcase of the vibrant community driving its future.
Amongst all the anticipation for Drupal CMS v1 release, stay tuned for The DropTimes special edition newsletter featuring Drupal CMS release and launch parties.
Interviews
- Accessibility Always a Focus in Drupal! - A Conversation with Gareth Alexander, Starshot Track Lead for Accessibility Tools
Discover Drupal
- Building a Schema.org-First Future with the Schema.org Blueprints Module for Drupal
- Drupal 7 End of Life: What It Means and How to Move Forward
- SimplyTest.me: A Tool for Effortless Drupal Testing
- Drupal CMS Release Candidate Available for Testing
- Navigating Authentic Contribution in Open Source: A Call to Action
Event
- Apply by Jan 31 to Lead at DrupalCon Atlanta’s Nonprofit Summit!
- Drupal Dev Days 2025: Take a Look at the Venue and Travel Options
- CMS Kickoff 2025: Where the CMS Community Connects and Grows
- Events of the Week: January 13 - 19, 2025
Organization News
- AddWeb Solution Extends Support for Drupal 7 Through 2025
- Backdrop CMS Recognizes Drupal 7 End of Life, Announces Next Steps
- Varbase 10.0.3 Released: Simplifying Drupal Development
We acknowledge that there are more stories to share. However, due to selection constraints, we must pause further exploration for now.
To get timely updates, follow us on LinkedIn, Twitter and Facebook. You can also join us on Drupal Slack at #thedroptimes.
Thank you,
Sincerely
Alka Elizabeth
Sub-editor, The DropTimes.
Freelock Blog: Creating Product Bundles in Drupal Commerce
Creating Product Bundles in Drupal Commerce
Jan 12, 2025 By John LockeAs we start developing mini-products to offer to our clients, we've found we actually need to group multiple products under one purchase.
Dev Corner Read Morejoshics.in: Sustaining Drupal 7 Post-EOL: In-Depth Strategies for Collaboration & Ecosystem Updates
As the long-standing powerhouse supporting numerous websites, Drupal 7 faces fresh challenges with its end-of-life (EOL). For developers and site owners committed to maintaining their investment, a strategic approach involving collaboration and proactive updates is crucial. Here’s an expanded guide on sustaining your Drupal 7 site effectively post-EOL.
Why Continue with Drupal 7?There are several reasons why maintaining Drupal 7 might still be beneficial:
- Stability and Familiarity: For many organizations, Drupal 7 offers a stable and well-understood environment. Teams that have fine-tuned their processes around it may prefer to stick with what works.
- Resource Constraints: Transitioning to Drupal 10 or an alternative can require significant resources—including time, budget, and technical adjustments—that some organizations may not have readily available.
- Security Vulnerabilities: With the cessation of official updates, potential security loopholes pose a higher risk. Proactively monitoring and patching these vulnerabilities becomes critical.
- Module Compatibility: As web standards and technologies evolve, some Drupal 7 modules might fall out of sync with modern requirements, leading to functionality issues.
- Reduced Community Support: With the community shifting focus to newer versions, accessing help and resources could become more difficult.
- Engage with Community Initiatives:
- Find Dedicated Groups: Engage with forums and groups committed to Drupal 7 maintenance. Collaborating with like-minded individuals can provide new solutions and resources.
- Join Working Groups: Participate in specialized working groups focused on Drupal 7. Contribute your insights and leverage shared knowledge to solve common challenges.
- Contribute to Module Maintenance:
- Adopt Key Modules: Identify key modules vital to your site’s operation and dedicate resources to their maintenance. Consider becoming a co-maintainer or collaborating with other developers.
- Develop Custom Patches: For modules with limited external support, develop and share custom patches that address critical issues or improve functionality.
- Share Updates and Insights:
- Create Knowledge Networks: Build a network of professionals managing Drupal 7 sites. Regularly share updates, best practices, and insights on overcoming challenges.
- Host Webinars and Workshops: Organize webinars and workshops to disseminate knowledge and foster collaboration. These platforms can serve as valuable venues for sharing discoveries and learning from peers.
- Monitor Emerging Trends:
- Stay informed about industry trends and find ways to integrate relevant advancements into your Drupal 7 environment. This proactive stance helps keep your site competitive and functional.
- Upgrade Wisely:
- Plan gradual enhancements to the core and modules, ensuring they're aligned with evolving standards. This step-by-step approach can prevent sudden disruptions and maintain site reliability.
- Evaluate Alternatives:
- Regularly assess other platforms and updates. Even if sticking with Drupal 7 for now, knowing your options keeps you prepared for future transitions when resources permit.
Sustaining Drupal 7 post-EOL requires a strategic blend of collaboration, innovation, and vigilance. By actively engaging with the community, committing to module maintenance, and adapting to ecosystem changes, you can extend the life of your Drupal 7 site while planning for the future. This commitment to proactive management ensures your site remains secure, efficient, and ready to meet current demands.
Add new comment
Freelock Blog: Ask Freelock: ECA vs Rules
Ask Freelock: ECA vs Rules
Jan 10, 2025 By John LockeYesterday a client asked us to install Rules module (again, repeating an earlier request, when he had missed my answer that we had installed ECA instead).
Ask Freelock Read MoreTag1 Consulting: New Critical Security Updates for Drupal 7 Highlight Importance of Drupal 7 Extended Support by Tag1
Starting January 2025, the Drupal Security team will no longer review reported issues or release security updates for Drupal 7 core or contrib modules. To address this, the Drupal Association has authorized Tag1 to be a D7 Extended Support Partner, ensuring your D7 sites stay protected with Tag1's Drupal 7 Extended Support (D7ES). We will continue to monitor for security vulnerabilities and provide updates and support to ensure your site remains safe and secure beyond January 2025.
Hank Fri, 01/10/2025 - 12:29MidCamp - Midwest Drupal Camp: MidCamp 2025: Shape the Future of Drupal with Your Ideas!
MidCamp 2025: Shape the Future of Drupal with Your Ideas!
The countdown is on: there are only two days left to submit your session proposal for MidCamp 2025! This premier event for the Drupal community will take place in Chicago from March 20-23, 2025, bringing together enthusiasts, developers, and innovators for a celebration of knowledge-sharing and collaboration.
Since its inception in 2014, MidCamp has hosted over 300 incredible sessions, and this year promises to continue the tradition of excellence. With a lineup that includes Drupal Founder Dries Buytaert as a guest speaker, organizers are eager to round out the schedule with diverse and engaging presentations from the community.
Final Call for Submissions
The deadline to submit session proposals is Sunday, January 12, 2025. Whether you're a seasoned expert or a newcomer with fresh ideas, there's a place for your voice at MidCamp. Tracks include topics for all skill levels, ranging from beginner-friendly workshops to advanced technical deep dives.
For inspiration, potential speakers can explore past sessions or visit the session tracks page to align their ideas with event themes.
Key Dates to Remember:
- Proposal Deadline: January 12, 2025
- Speakers Notified: Week of February 17, 2025
- Speaker Workshop: March 2025 (Date TBD)
This workshop will focus on preparing your session for presentation. It will be primarily for MidCamp presenters, but we will also welcome folks who would like assistance with their DrupalCon presentations. - MidCamp Sessions: May 20-21, 2025
Sessions will be presented Tuesday, May 20, 2025, or Wednesday, May 21, 2025.
The workshop will focus on preparing speakers for their presentations and will also welcome individuals preparing for DrupalCon.
Sponsorship Opportunities
MidCamp wouldn’t be possible without the generous support of sponsors. Sponsoring MidCamp 2025 is a great way to showcase your organization to a highly engaged and technical audience. Sponsorship packages are designed to fit a variety of budgets and goals, with opportunities starting at just $600. Whether you’re looking to recruit new talent, promote your brand, or simply support the community, there’s a package for you. The earlier you sign up, the greater the exposure your organization will receive.
Learn more about sponsorship opportunities
Stay Connected
Stay in the loop with all things MidCamp by joining the community on Slack, following us on social media, and subscribing to our newsletter:
- Slack: Join the conversation and connect with fellow attendees on the MidCamp Slack.
- Social Media: Follow us on Twitter, Bluesky, Mastodon, and LinkedIn.
- Newsletter: Subscribe to our email updates to get the latest news on sessions, venues, and more.
With only days remaining, don’t miss the chance to share your expertise and join an exceptional lineup of speakers at MidCamp 2025. Submit your session today at midcamp.org/2025/submit-session.
Droptica: Multi-Step Form in Drupal - How to Create It in a Simple Way?
Drupal is a powerful tool that gives you many possibilities to create robust web applications. One of the popular modules for this system is Webform, which allows you to work with advanced online forms. In this blog post, I'll show you how to build a multi-step form in just a few easy steps - perfect for registering for events or collecting other submissions. I invite you to read the article or watch the episode of the "Nowoczesny Drupal" series.