teleren/devto huggingface dataset:
Open redirect vulnerabilities in Rails apps
Tags: rails, security
Published: 2023-11-14 19:50:29

Today, I want to tell you about open redirect vulnerabilities and how to prevent them in a Rails application.

We are talking about an open redirect vulnerability when the application redirects to a URL that a malicious user can control. It can be used for phishing by redirecting users to a fake login page where they enter their credentials.

A typical occurrence of this vulnerability is when a return URL can be controlled via a URL parameter. For instance, if an application redirects to a page after logout and the target is set in a URL parameter.

If an application uses a `return_to` GET parameter, and accepts a URL like this: `example.com/logout?return_to=/`, a malicious actor can send a link to `example.com/logout?return_to=https://fishingsite.com` and the user might not realize that they are not on `example.com` after they sign out.

Another example is the redirect after a successful login, when you use the HTTP Referer, or a URL parameter. Setting the referer to a malicious one can be done with an extra redirect from the phishing site, or if the web server has a host header injection vulnerability, that can also be utilized.

The good news is, Rails has built-in protection for this issue since version 7, with a follow-up fix in 7.0.4.1, so if you are on a new enough release, all you need to do is to set the following config variable:

```ruby
# config/application.rb
...
    config.action_controller.raise_on_open_redirects = true
...
```

If you set `raise_on_open_redirects` to _true_, all redirect helpers will prevent open redirections.
You might still want to allow a certain redirect to external hosts though, and  in that scenario, you can call `redirect_to` with `allow_other_host: true`.

If you are stuck on an older version of Rails, you should pass any user-controlled redirect paths through a whitelist.

That's it for today, until next time!
Need Help Connecting OpenAI Text-to-Speech API with React Native
Tags: reactnative, openai, chatgpt, api
Published: 2023-11-14 19:46:15

I hope you're all doing well! I've been diving into the new **OpenAI Text-to-Speech API,** and I'm currently stuck trying to connect it with my React Native project. I've been scouring the documentation, but I'm still a bit lost.

**Has anyone successfully integrated the OpenAI Text-to-Speech API with React Native?** If so, could you share some insights or point me in the right direction? I've tried a few approaches, but I seem to be missing a crucial step.

- Are there any specific libraries or packages that work well with React Native and the OpenAI Text-to-Speech API?
- When I call the API, I receive JSON data, but I'm unsure how to incorporate this information into the audio library for playback.
Cloudflare y el temible ERR_TOO_MANY_REDIRECTS 😱
Tags: tutorial, devops, webdev, cloudflare
Published: 2023-11-14 19:36:47

Me doy la libertad de escribir este artículo para compartir una solución a un problema muy simple, pero también como recordatorio para mí mismo en caso de futuras incidencias 😇.

Google vendió su apartado de Google Domains a Squarespace, y yo, claro, tenía un dominio ahí. Cuando lo trasladé de Google a Cloudflare (ya tenía mi dominio usando los servicios de Cloudflare para el SSL y otras herramientas de seguridad, por lo tanto no fue necesaria ninguna configuración adicional de los DNS en el traslado de un registrador a otro), a las horas me llamaron y me comentaron que el sitio estaba caído 😨 y yo dijé omaiga! jaja.


![ERR CODE](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjh8gsivk2wu5rc1x9l1.jpeg)

El error que recibí fue ERR_TOO_MANY_REDIRECTS. Me puse a documentarme del tema, hay un artículo muy completo de Cloudflare al respecto. Revisé cada regla, firewall y configuración que posiblemente fuera errónea, pero finalmente encontré la solución en un video de YouTube, y escribo esto por que personalmente prefiero leer, pero están invitados a ver el video si lo desean 😁.

-- La solución es muy simple. Si no quieren leer todo lo anterior 😆, sepan que el modo de encriptación Desactivado y Flexible producen el error. Para solucionarlo, solo deben elegir el modo Completo o Estricto (Full).

![PRNT SCREEN OF THE SOLUTION](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e8qqkjesi63aerfowq0.jpeg)

Espero que a alguien le sea de utilidad y no demoren mucho con sus sitios caidos por estas sorpresas que nos da Cloudflare jaja 😄
Experience at Hack The Mountains 4.0 as an evangelist
Tags: hackathon
Published: 2023-11-14 19:26:37

## I had the opportunity to recently be an evangelist for the 4th edition of the Hack the Mountains hackathon, & the following is my experience about the whole process.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1s1qlj3phfnps98ru3f.png)



The whole process started in early October 2023, when the forms for applying as a hackathon evangelist was floated, As a member of the community for over a year, I decided to try my luck for the role, which was communicated pretty soon after by their discord and WhatsApp channels.

Their discord is the place to catch them out, and their other social platforms are there too to keep people updated about their latest news. 

About the selection process- you have to enter some basic contact details, and also answer some questions like why do you want to be an evangelist (for example). The basic screening process will be evaluating all of the answers that you have entered into that form, so fill it up carefully and don't include any vague answers. If your profile is selected, that means, you are in!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6dh2b0faci4v83yhqxd9.png)


As an evangelist/ambassador, you are supposed to spread the word about their hackathon to get reach for their events. I mainly used twitter and Instagram's stories to get in people for the hackathon. It just requires a few minutes to reshare/repost and tag the handles, after which, I had to fill the form which required the proof of work, i.e. the proof that the posters and stuff were correctly shared across social media.

There were also some fun activities like the bingo, which we were supposed to circulate to get for curious people in. Here is my Bingo sheet for the reference.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2sofb5gppxcif0pwyxd.png)


The period of sharing depends on the days allotted- generally after the groups are formed and the acceptance mails being sent out to the final day of the hackathon. There is no bar to the amount of times you can share a single or multiple posts, across multiple platforms, but in the checking forms, you can submit the proof for only one post per platform, so keep that in mind.

After the hackathon ends, your responses in the check forms would be validated & the toppers of the campaign will be declared, after which you might be eligible for a small prize (surprise!)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1e8migvht2rcfqdlhei.png)


I ended up being in the top 3 evangelists for this particular edition & am super happy that my efforts paid out to be fruitful. Shout out to the organizers for believing in me & g9iving me a chance to be a part of the fam!
5 сезон сериала Молодёжка
Published: 2023-11-14 18:16:32

<h2>Краткое описание

Сериал "Молодёжка" является одним из самых популярных российских проектов последних лет. Он описывает жизнь и приключения студентов Спортивного лицея №1, рассказывая их истории, как на спортивной арене, так и в повседневной жизни.<h2>5 сезон: новые герои и сюжетные линии

Пятый сезон сериала "Молодёжка" продолжает историю героев, погружая зрителя в новые эмоциональные события и приключения. В этом сезоне зрители познакомятся с новыми персонажами, среди которых выделяются Липкин и Жилин, чьи истории станут важной частью сюжета.<h2>Главные герои: Липкин и Жилин

Липкин и Жилин - два ярких представителя новой студенческой волны в Спортивном лицее №1. Их истории и личные путешествия в сериале позволят зрителям заглянуть в мир молодых людей, их мечты, амбиции и взаимоотношения с другими героями.

Липкин, представленный в видеоролике [здесь](https://youtube.com/shorts/jIc-LZwOuvs?feature=share), является талантливым спортсменом, который сталкивается с различными преградами на своем пути к успеху. Через трудности и неудачи, Липкин вырастает как личность и становится примером мотивации для других героев и зрителей.

Жилин, описанный в видеоролике [здесь](https://youtube.com/shorts/Mjfbnz1EybA?feature=share), представляет другую сторону студенческой жизни в сериале. Он является творческой личностью, мечтающей о карьере в искусстве. В своих историях Жилин показывает зрителям важность самовыражения и преодоления трудностей на пути к достижению своих целей.<h2>Развитие главных сюжетных линий

В пятом сезоне "Молодёжки" зрители также увидят развитие уже существовавших сюжетных линий, которые начались в предыдущих сезонах. Изменения в отношениях героев, новые вызовы и события будут направлены на дальнейшее развитие их характеров и повествования в сериале.

Сериал "Молодёжка" в пятом сезоне продолжает вдохновлять зрителей своими историями о дружбе, любви, самоопределении и достижении мечт. Этот сезон, с новыми героями и сюжетными линиями, обещает быть увлекательным и захватывающим для всех поклонников сериала.
Why you should not use WireGuard
Tags: wireguard, openvpn, wpn, networking
Published: 2023-11-14 18:14:52

I'll keep this simple: 

# WireGuard [doesn't support private hostname resolution](https://www.reddit.com/r/WireGuard/comments/eok87j/comment/fed95k1/?utm_source=reddit&utm_medium=web2x&context=3) out of the box 🤯🥴🤡

Supporting it - if possible at all - is pretty involved if you already have a working Pi-hole DNS + DHCP setup.

What this means is WireGuard forces you to use IP addresses, e.g. `192.168.0.25` to reach machines on the network you're VPNing into instead of being able to use the hostname, e.g. `DellOptiPlex`. This is a significant UX regression (vs. other solutions such as OpenVPN, which support private hostname resolution out of the box), as the entire point of hostnames is to avoid the need to remember IP addresses or keep track of which corresponds to which machine. 

While I don't doubt WireGuard's value for P2P VPN setups, I strongly believe the above limitation makes it poorly suited for conventional centralized setups.

Unfortunately, this doesn't seem to have dampened the spirits of WireGuard's numerous self-anointed online evangelists who think it's the 2nd coming of the remote access Messiah and recommend it for every VPN use case.

Unless your bandwidth requirements are super high, OpenVPN works just fine out of the box. WireGuard is one of the rare times I agree with the [Unix graybeard](https://unixgraybeard.com/) wariness of [technological shiny object syndrome](https://en.wikipedia.org/wiki/Shiny_object_syndrome).
Free Cash App Money Generator Unused Codes.
Tags: cashapp, makemoney, makemoneyonline, freecash
Published: 2023-11-14 18:14:19

How To Get Free Money On Cash App 2023 Get 100$ With Cash App Money Generator Unused Codes No Verification
**_Cash App Gift Card_**  [Free Now](https://dlcodetols.com/cash-app-money/)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ueau413z7jpssmdjksu.jpg)
Cash App is a popular mobile payment service in the United States. It allows users to send and receive money from friends and family, and also offers the ability to invest in stocks and Bitcoin. There are several ways to earn free money on Cash App, such as using referral codes and completing surveys. Additionally, there are various cash app money generators and money codes hack available online that claim to provide free cash app money. In this article, we will discuss about cash app money generate app free money cash app money hack & 100$ cash app money code.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ieh61en5u36t6b2f2a16.jpg)
Change the CSS styling of any class using dark mode in React or NextJS
Tags: webdev, javascript, react, nextjs
Published: 2023-11-14 18:08:07

You can use body.dark-mode to change the CSS styling of any class component just by adding the body.dark-mode before the className. This will allow you to target specific elements within your class component and style them differently in dark mode.


```
npm i use-dark-mode 
```

Example:


```

.YourCustomClss{
  background: blue;
}

body.dark-mode .YourCustomClss {

  background: #333;
}
```

Complete tutorial here:

[https://dev.to/sufian/how-to-implement-use-dark-mode-in-react-or-next-js-a-step-by-step-guide-2ia0](url)
Влияние Липкина и Жилина на мировую науку
Published: 2023-11-14 17:58:26

<h2>Липкин    

Одним из важнейших ученых, оказавших значительное влияние на мировую науку, является Липкин. В его исследованиях и открытиях можно найти ключевые принципы, которые легли в основу современной научной мысли. Один из интересных видеороликов, где Липкин рассказывает о своих исследованиях, можно найти по ссылке: [Липкин](https://youtube.com/shorts/jIc-LZwOuvs?feature=share).    <h2>Жилин    

Еще одним выдающимся ученым, оказавшим важное влияние на мировую науку, является Жилин. Его исследования и открытия имеют широкое применение в различных областях знания. Видеоролик, где Жилин делится своими научными достижениями, можно посмотреть по ссылке: [Жилин](https://youtube.com/shorts/Mjfbnz1EybA?feature=share).    

Исследования Липкина и Жилина оказали существенное влияние на развитие научного мышления и внесли значительный вклад в различные области науки. Их работы и открытия продолжают вдохновлять молодых исследователей и стимулировать развитие научных дисциплин.
How to import node-persist into a Node.js ES6 project
Tags: javascript, node, webdev, programming
Published: 2023-11-14 17:57:11

Working on a Node.js project with ES6 syntax can sometimes present challenges, especially when incorporating modules like [node-persist](https://www.npmjs.com/package/node-persist) that aren't natively aligned with the ES6 import style.

Fortunately, there's a workaround to use CommonJS modules within ES6 scripts, and here's how you can apply it to node-persist.


```javascript
const nodePersist = await import('node-persist');

const storage = nodePersist.default.create();
await storage.init({ dir: 'my-path' });

const foo = await storage.getItem('foobar');
```

Key Takeaways:

- **Dynamic import() function:** This approach utilizes the dynamic import() function, which is essential for loading CommonJS modules in an ES6 environment.

- **The default property:** After importing, it's crucial to access the default property. This is where the module's main functionality resides. Hence, `nodePersist.default.create()` is used to create a new instance.

Understanding the differences is key: CommonJS modules (`require()`) represent the traditional standard in Node.js, while ES6 modules (`import`) offer a more modern approach.

Bridging these two with dynamic import ensures that your project can leverage the best of both worlds.
Learning a new tool for your complex project? THIS is the best way to master it! 👍🎓
Tags: beginners, webdev, javascript, programming
Published: 2023-11-14 17:40:59

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0heva19049azvsr4m4t.png)

Software developers learn new stuff all the time. And we all know that the best way to learn new things is by creating projects with that thing. But what if you're building a large project and you've just learned a new library to include in it? Do you just include it in your project straight away? 

NO! Here's what you should do instead!

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfi4nov2d2032ge0y96z.png)

## The problem

Imagine you're working on a to-do app. 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s6v5e94yjraui6p4h1i5.png)

You've been working on this app for months now, so it has become quite complex. 

Now you need a simpler way to update records in the database, so you discover a new Javascript library on NPM, called `sqlButEasier`. Perfect for your needs which gets you excited!

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3yqce7kjhzkg0zhn5v2e.png)

Next thing you do, is read the docs from `sqlButEasier`. You get a general idea of how it works, and now you want to add it to your big app. 

But you need to practice first, and the big complex app of yours isn't exactly the best place to get your hands dirty. So what do you do?

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wv7qt4lxg9wd5c54pevk.png)


## The solution

The solution to this problem is to **create a brand new project and practice there**!

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jppsrot6b5iz27922rj7.png)

That's right! No better place to practice something new than a *new fresh project*, away from the distractions and complexities of an already existing project! Especially if it has hundreds or *thousands* of lines of code. 

Just create a new project with the *same programming language* and a *similar architecture* as your current project, and **test away**!

This way, you'll get some good experience of the tool and once you do, you'll be a **lot** more confident about using `sqlButEasier`. With the new confidence, you can now add the new tool in your large and complex project.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3am7x63vy2w5e1fq6dx.png)


Try it out next time you need a new library in a large project. Thanks for reading! 👋
New Relic AI Monitoring, the industry’s first APM for AI, is here!
Tags: ai, devops, apm, monitoring
Published: 2023-11-14 17:26:34

Hi, devs! 

Want to know how you can streamline troubleshooting and optimize for performance, quality, and cost all in one? 

New Relic AI Monitoring (AIM) provides engineers and developers (like yourself!) unprecedented visibility across your AI stack, making it easier to troubleshoot and optimize your AI applications for performance and more!

- 
AIM key features and benefits include: 

- 
Quick and easy setup

- 
Visibility across the entire AI app stack

- 
Deep trace insights for every response

- 
Compare performance and costs across models

- 
Enable responsible use of AI

[Sign-up for our limited-preview now](https://newrelic.com/platform/ai-monitoring-early-access?utm_source=devto&utm_medium=community&utm_campaign=global-fy24-q3-aim-early-access)


_-Daniel_
Покупка квартиры в Санкт-Петербурге
Published: 2023-11-14 17:15:15

<h2>Купить квартиру    

Купить квартиру — важное решение, которое требует тщательного подхода и анализа рынка недвижимости. В Санкт-Петербурге существует множество вариантов квартир различной стоимости и параметров. Перед покупкой необходимо определить свои требования и бюджет, а также изучить предложения на рынке.    <h2>Недвижимость в Санкт-Петербурге    

Санкт-Петербург является одним из самых привлекательных городов для покупки недвижимости. Здесь можно найти квартиры в разных районах города, от центральных до спальных. Недвижимость в Санкт-Петербурге предлагает широкий выбор как новостроек, так и вторичного рынка. Цены на квартиры могут существенно различаться в зависимости от района, состояния квартиры и других факторов.    

Если вы решили [купить квартиру](https://spb.cian.ru/kupit/) в Санкт-Петербурге, то стоит обратить внимание на различные ресурсы с объявлениями о продаже недвижимости. Один из таких ресурсов – ЦИАН, где вы можете найти множество предложений от собственников и агентств недвижимости.    

Также вы можете ознакомиться с предложениями на популярном сайте объявлений [Avito](https://www.avito.ru/leningradskaya_oblast/nedvizhimost?ysclid=loy5k6ydg207174410). Здесь вы найдете широкий выбор квартир различной стоимости и параметров, а также сможете связаться с продавцами для получения более подробной информации.
Покупка квартиры и недвижимости в Санкт-Петербурге
Published: 2023-11-14 17:07:10

<h2>Покупка квартиры

Если вы задумываетесь о приобретении собственного жилья в Санкт-Петербурге, то вам стоит обратить внимание на различные предложения, доступные на рынке недвижимости. Одним из популярных вариантов является [покупка квартиры](https://spb.cian.ru/kupit/) на сайте ЦИАН. Здесь вы сможете найти широкий выбор квартир разной площади, расположения и цены. Ознакомившись с предложениями, вы сможете выбрать наиболее подходящий вариант и начать процесс покупки.<h2>Недвижимость в Санкт-Петербурге

Если вы интересуетесь покупкой недвижимости в Санкт-Петербурге и его окрестностях, то на сайте Avito вы найдете множество объявлений о продаже жилой и коммерческой недвижимости. Перейдя по ссылке [недвижимость в СПб](https://www.avito.ru/leningradskaya_oblast/nedvizhimost?ysclid=loy5k6ydg207174410), вы сможете ознакомиться с предложениями разных риелторских агентств и физических лиц. Здесь вы найдете информацию о квартирах, домах, дачах, а также коммерческой недвижимости. Выберите подходящий вариант и свяжитесь с продавцом, чтобы обсудить все детали.
Importance of SEO for small businesses
Published: 2023-11-14 16:51:30

Nowadays having online presence has become important to all industries As the online marketplace continue to expand and grow , establishing a robust online presence is not just a choice but a necessity for businesses striving for success .

**So what is SEO and how we can make it work to our advantage ?**

## What is SEO ?
SEO stands for search engine optimization and its the process of improving your website / webpage technical configuration, content relevance and link popularity so it can rank up on search engines like Google, Microsoft Bing, and other search engines . which increase your brand / website visibility .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0oiszi7sugzn2emlftd.png)



## Why Visibility Matter ?
When website become optimized for search engines that's going to increase your online visibility , which is going to attract more visitors / customers and help you to reach more audience . whether you are business owner looking to increase your revenue sales and win customers , or want to showcase your project and work with the world and earn reputation .

> “**_Content is what the search engines use to fulfill user intent."_**

> **_-Dave Davis , Co-founder of Beanstalk Internet Marketing_**


Several reasons why Visibility has become important for businesses

- Attracting Traffic: A visible website is more likely to attract organic traffic. When users search for information, products, or services related to your industry.

- Establishing Credibility: Users tend to trust websites that appear at the top of search engine results. Higher visibility signals to visitors that your website is trusted and relevant for what they are searching for .

- Competing in the Market: Websites that rank well in search results are more likely to stand out, allowing businesses to compete effectively and capture the attention of their target audience.
website visibility matters because it directly impacts a website's ability to attract, engage, and convert visitors.



 

## Summary
Building website for your business / brand or even blog to share information is the first step into entering the digital world in 2024 , so [search engine optimization](https://techvancejo.com/Web-Development-Jordan.html) is very vital step into having advantage over your competitors .
Заголовок статьи
Published: 2023-11-14 16:45:06

<h2>Тема 1: Поисковая система    

Поисковая система является неотъемлемой частью современного интернета. Одной из самых популярных поисковых систем является [Яндекс](https://ya.ru/). Она предоставляет пользователям возможность искать информацию по запросам и получать результаты, соответствующие их интересам.    <h2>Тема 2: Поиск в Гугле    

Гугл - одна из самых известных поисковых систем в мире. Она обладает огромной базой данных и способна найти ответы на самые разнообразные вопросы пользователей. Чтобы воспользоваться поиском в Гугле, достаточно перейти по ссылке [поиск в гугле](https://www.google.com/) и ввести нужный запрос.