Encontrar

Digest
· Aug 1

Résumé de la communauté des développeurs d'InterSystems, Juillet 2025

Bonjour, voici la newsletter de la communauté des développeurs de Juillet 2025.
Statistiques générales
✓ Nouvelles publications 23 publiées le Juillet :
 12 nouveaux articles
 10 nouvelles annonces
 1 nouvelle question
✓ Nouveaux membres 2 ayant rejoint le Juillet
✓ Publications 1,222 publiées depuis le début
✓ Membres 181 ayant rejoint depuis le début
Meilleures publications
Mon Haïku IRIS
Par Liam Evans
Les meilleurs auteurs du mois
Articles
#InterSystems IRIS
#InterSystems IRIS for Health
#Communauté des développeurs officielle
#Summit
Annonces
#InterSystems IRIS
#Communauté des développeurs officielle
#Offres d'emploi
#TrakCare
#IRIS contest
Questions
Juillet, 2025Month at a GlanceInterSystems Developer Community
Article
· Aug 1 3m read

Evitar la inyección SQL en InterSystems IRIS: el caso a favor de prácticas seguras de consulta

La inyección SQL sigue siendo una de las vulnerabilidades más críticas en las aplicaciones basadas en bases de datos, ya que permite a los atacantes manipular consultas y, potencialmente, acceder o comprometer datos sensibles. En InterSystems IRIS, los desarrolladores tienen acceso tanto a SQL Dinámico como a SQL Embebido, cada uno con características distintas. Comprender cómo usarlos de forma segura es esencial para prevenir la inyección SQL.

El problema: SQL Dinámico y la inyección SQL

El SQL Dinámico construye consultas como cadenas durante la ejecución. Aunque esto ofrece flexibilidad, también crea una vulnerabilidad si no se maneja correctamente la entrada del usuario. Por ejemplo:

Set query = "SELECT Name, Age FROM Patients WHERE Age > "_age
Set statement = ##class(%SQL.Statement).%New()
Set status = statement.%Prepare(query)

Si la edad es proporcionada por el usuario, concatenarla directamente en la cadena de consulta expone la aplicación a una inyección. Un atacante podría proporcionar un valor malicioso como 0; DROP TABLE Patients, con resultados desastrosos.

La solución: consultas parametrizadas

Las consultas parametrizadas son la mejor defensa contra la inyección SQL. En lugar de concatenar entradas en la consulta, los valores del usuario se vinculan como parámetros. Aquí hay un enfoque seguro utilizando SQL Dinámico:

Set query = "SELECT Name, Age FROM Patients WHERE Age > ?"
Set statement = ##class(%SQL.Statement).%New()
Set status = statement.%Prepare(query)
If status {
    Set result = statement.%Execute(age)
    While result.%Next() {
        Write "Name: ", result.Name, ", Age: ", result.Age, !
    }
}

 

Aquí, el marcador de posición ? asegura que el valor de edad sea tratado estrictamente como dato y no como código ejecutable, lo que reduce significativamente el riesgo de inyección.

SQL Embebido: seguridad incorporada

El SQL Embebido integra SQL directamente en ObjectScript, protegiendo de forma inherente contra la inyección SQL. La sintaxis de variables anfitrión (:variable) vincula de forma segura los parámetros en tiempo de compilación:

&sql(SELECT Name, Age INTO :name, :age FROM Patients WHERE Age > :minAge)

Con SQL Embebido, no existe un mecanismo para concatenar directamente entradas sin procesar del usuario en la consulta, lo que previene la inyección.

Comparación entre SQL Embebido y SQL Dinámico

Característica SQL Embebido SQL Dinámico
Seguridad Seguro contra inyecciones gracias a las variables anfitrión Seguro si se incluyen parámetros; existe riesgo si no se hace
Flexibilidad Limitada (solo consultas estáticas)   Altamente flexible para escenarios dinámicos
Capacidad de búsqueda Fácil de ubicar en definiciones de clase Más difícil de analizar; las consultas están en cadenas
Rendimiento Compilado en 'tiempo de compilación de clase' Analizado y optimizado en tiempo de ejecución

Cuándo usar SQL Dinámico

El SQL Dinámico es útil cuando las estructuras de consulta deben determinarse en tiempo de ejecución, por ejemplo, al agregar filtros opcionales:

Set query = "SELECT Name, Age FROM Patients"
If includeGender {
    Set query = query_" WHERE Gender = ?"
}
Set statement = ##class(%SQL.Statement).%New()
Set status = statement.%Prepare(query)
If status {
    Set result = statement.%Execute("Male")
}

Recuerda siempre usar parametrización (?) para estas consultas construidas dinámicamente a fin de mantener la seguridad.

Conclusión

El SQL Dinámico permite una construcción flexible de consultas, pero requiere un uso responsable para evitar riesgos de inyección SQL. Las consultas parametrizadas abordan eficazmente este riesgo. Mientras tanto, el SQL Embebido incluye protecciones incorporadas, lo que lo convierte en una excelente opción para consultas estáticas. Al usar estos enfoques de manera adecuada, los desarrolladores pueden crear aplicaciones sólidas y seguras con InterSystems IRIS.

Discussion (0)1
Log in or sign up to continue
Question
· Aug 1

How to Change Login Email Address?

Hello Community,

I’d like to know how I can update my login email address from the profile section.

When I click the "Edit" option in my profile, it redirects me to login.intersystems.com. However, even on that page, I don’t see an option to edit the login email address. [unable to edit]

Could someone please guide me on how to change my login email?

Thanks in advance!

8 Comments
Discussion (8)4
Log in or sign up to continue
Digest
· Aug 1

InterSystems 开发者社区摘要,七月 2025

您好,欢迎阅读 七月 2025 开发人员社区通讯。
统计信息
✓ 七月发布了 9 篇新帖子:
 1 new article
 6个新公告
 2个新问题
✓ 七月有 25 位新成员加入
✓ 所有时间发布了 2,397 篇帖子
✓ 所有时间有 2,256 位成员加入
最高职位
本月最佳作家
文章
#InterSystems IRIS for Health
公告
问题
#InterSystems IRIS
IRIS HTML 标签
按Alan Zheng
#Caché
七月, 2025Month at a GlanceInterSystems Developer Community
Discussion
· Aug 1

Dark Mode for HealthShare Management Portal - Visual Accessibility Need

Hello InterSystems Community,

I hope you're all doing well. I'm reaching out to ask if there's any way to enable a dark theme or dark mode for the HealthShare Management Portal.

Background

I have a visual impairment (amblyopia/lazy eye) which means I'm nearly blind in one eye. Like many people with visual difficulties, I find that bright white backgrounds and interfaces cause significant eye strain and fatigue. This makes it challenging to work with the Management Portal for extended periods.

What I've Found So Far

I've searched through the community forums and documentation, but I've only found discussions about dark mode for InterSystems Studio. However, I specifically need to know about dark mode options for the HealthShare Management Portal (the web-based interface).

My Questions

  1. Is there a built-in dark mode or theme option for the HealthShare Management Portal?
  2. Are there any configuration settings or CSS customizations that could achieve a darker interface? (I can enable dark theme in Web Browser, for example Mozilla Firefox but it does not let me see the Management Portal in dark theme).
  3. Has anyone in the community found workarounds or third-party solutions for this accessibility need?
  4. Are there any plans from InterSystems to add dark mode support to the Management Portal in future releases?

Why This Matters

Visual accessibility isn't just about personal preference—it's about making these powerful tools usable for people with various visual impairments. A dark mode option would significantly improve the user experience for those of us who struggle with bright interfaces.

I'd greatly appreciate any insights, suggestions, or experiences you might have with this issue. Even if there's no official dark mode, I'd be interested in hearing about any CSS modifications or browser extensions that might help.

Thank you in advance for your time and assistance!

Best regards,

Yone

8 Comments
Discussion (8)5
Log in or sign up to continue