n3a9 / mlh-events

The unofficial API for MLH events.
https://mlh-events.now.sh
13 stars 4 forks source link

Hackathons with an @ in their name return [email protected] #17

Open kristelfung opened 5 years ago

kristelfung commented 5 years ago

Looking at https://mlh-events.now.sh/na-2019, the hackathons HACK@WPI and HACK@CEWIT return [email protected] when trying to access their name.

dawsbot commented 5 years ago

Thanks for the bug report @kristelfung! We'll have to take a look at this. Are you interested in taking a look at this? It would help us refine the documentation if we could see any missing or broken documentation on our end.

kristelfung commented 5 years ago

Sure, I'll take a look!

kristelfung commented 5 years ago

I suspect mlh.io is using Cloudflare's email address obfuscation, so anything with an @ is being treated as an email and is thus returning [email protected]. Maybe this will help!

dawsbot commented 5 years ago

Sorry for the delay, I just sent the engineering team at MLH an email! Here's the solution they'd need to do:

To prevent Cloudflare from obfuscating emails, you can:

Add the following comment in the page HTML code: <!--email_off-->you email addresses, goes here<!--/email_off-->

Updates to come!

@kristelfung Thanks for publishing https://github.com/kristelfung/mlh-search you reminded me of this issue! Go tell people about this API and if it gets used more, MLH will be more likely to co-improve it when bugs like this come up :)

kristelfung commented 5 years ago

@dawsbot Awesome, thanks for the update! I'll definitely spread the word about the API.

dawsbot commented 5 years ago

"Thanks for sharing this with us. I know this isn't a long-term fix but you can retrieve the event name from the title attribute on the anchor tag. I cURL'd the events page and it doesn't seem like it obfuscates this attribute.

<a target="_blank" class="event-link" itemprop="url" title="Hack@CEWIT 2019" href="https://www.cewit.org/programs/events/hack.php">

This holds up with Cloudflare's documentation that you shared so it's reasonably stable and would be a better solution than disabling email obfuscation on that page. Hope this helps and let me know you have any other issues."

dawsbot commented 4 years ago

Looks like this is still an issue 😢

It's a Cloudfare setting that @MLH would need to adjust