623 Commits

Author SHA1 Message Date
Thiago Alves
0646e55eee Fix bug introduced by new Synergy driver 2025-12-05 14:00:33 -05:00
Thiago Alves
d9a6d065c1 Merge pull request #290 from NeoGaius/add_synergy_logic
Adds support for synergy logic
2025-12-04 11:50:24 -05:00
Thiago Alves
e9018252c7 Merge pull request #310 from BestDevOfc/csrf-patch
Fixed CSRF vulnerability, CVE is being issued
2025-12-04 11:49:28 -05:00
supermario
b9b8335db9 Fixed CSRF vulnerability, CVE is being issued 2025-12-03 14:53:18 -05:00
Thiago Alves
557e242717 Merge pull request #306 from AnthonyMarrongelli/master
Improper casting in start_ethercat() command parsing.
2025-11-12 09:46:00 -05:00
AnthonyMarrongelli
15be927697 Removed unneeded cast to char, causing unpredictable invalid dereference 2025-11-11 22:38:31 -08:00
Thiago Alves
4581def090 Merge pull request #305 from enp6s0/offline-font
Add Roboto webfont to local resources directory
2025-11-01 08:54:59 -04:00
enp6s0
15231bace6 Local resource: add Roboto webfont 2025-10-29 20:25:34 -07:00
Thiago Alves
3e23926c90 Fix compilation issue 2025-10-22 10:18:30 -04:00
Thiago Alves
7b190d0708 Update release 2025-10-22 10:09:40 -04:00
Thiago Alves
05aa81e432 Merge pull request #304 from Autonomy-Logic/master
Backport support for C/C++ Function Blocks from runtime v4
2025-10-22 10:07:00 -04:00
Thiago Alves
23a74f5e3a Merge pull request #6 from Autonomy-Logic/devin/1761094719-file-extraction
Add FILE: line extraction logic for C/C++ blocks in Runtime v3
2025-10-22 10:03:25 -04:00
Thiago Alves
ec3a29f28c Fix compilation issues 2025-10-22 09:58:45 -04:00
Devin AI
7ea8d717c5 Add FILE: line extraction logic to parse embedded C/C++ blocks from program.st
- Extract FILE: lines from program.st similar to DBG: line extraction
- Write extracted files to ./core directory with proper path handling
- Support subdirectories (e.g., FILE:test/abc.txt -> ./core/test/abc.txt)
- Remove FILE: and DBG: lines from program.st before MatIEC compilation
- No fallback .blank files needed for FILE: content

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-22 01:00:38 +00:00
Thiago Alves
9c246ca236 Merge pull request #302 from kristiandueholm/update-debian-image
Update to latest Trixie.
2025-10-21 13:32:34 -04:00
Kristian Dueholm Hill
cfa97c5b8e Update to latest Trixie. 2025-10-21 15:15:52 +02:00
Thiago Alves
7c61a3ad6b Fix file path validation logic 2025-10-09 14:42:55 -04:00
Thiago Alves
7b8e1afb4d Update release 2025-10-09 13:09:13 -04:00
Thiago Alves
82708866bf Merge pull request #300 from Autonomy-Logic/development
Add https REST API to communicate with OpenPLC Editor v4
2025-10-09 13:06:56 -04:00
Thiago Alves
c8ee03081d Add input validation to certificate generation 2025-10-09 13:03:37 -04:00
Thiago Alves
8259024518 Merge pull request #5 from Autonomy-Logic/devin/1759948103-replace-cryptography-with-openssl
Replace Python Cryptography with openssl
2025-10-09 12:36:48 -04:00
Thiago Alves
a67be6960b Fix raise identation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-09 12:34:31 -04:00
Thiago Alves
3ac32524a8 Fix https issue under Windows MSYS2 2025-10-09 11:59:45 -04:00
Thiago Alves
94e572ef10 Merge pull request #4 from Autonomy-Logic/devin/1759948103-replace-cryptography-with-openssl
Replace Python Cryptography with OpenSSL CLI for certificate generation
2025-10-08 16:57:18 -04:00
Thiago Alves
32dc75470b Small fixes 2025-10-08 16:55:23 -04:00
Devin AI
b3a1e65119 Add platform-conditional HTTPS: Linux only
Revert to Flask app.run() and add platform detection to conditionally
enable HTTPS with certificates only on Linux systems. Non-Linux systems
(Windows/MSYS2) skip certificate generation and run HTTP instead to avoid
SSL socket blocking issues.

Changes:
- Use platform.system() to detect Linux vs non-Linux
- Linux: Generate OpenSSL certificates and run HTTPS (unchanged behavior)
- Non-Linux: Skip certificate generation and run HTTP on same port
- Reverted make_server() changes back to app.run()

This provides a pragmatic workaround for Windows/MSYS2 SSL socket
compatibility issues while maintaining full HTTPS functionality on Linux.

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-08 20:44:10 +00:00
Devin AI
f01c1c05ba Force socket blocking mode for Windows/MSYS2 SSL compatibility
Replace Flask's app.run() with manual server creation using Werkzeug's
make_server(). This allows us to explicitly call socket.setblocking(True)
after SSL wrapping to fix errno 11 (EAGAIN) on Windows/MSYS2 where sockets
default to non-blocking mode.

Werkzeug never calls setblocking(True) after wrapping sockets with SSL,
which causes SSL operations to fail on platforms where sockets default to
non-blocking mode. This fix ensures blocking mode is enabled across all
platforms.

Changes:
- Use werkzeug.serving.make_server() instead of app.run()
- Explicitly call server.socket.setblocking(True) after server creation
- Maintain all existing functionality (threaded mode, SSL context, etc.)
- Add detailed comments explaining the Windows/MSYS2 compatibility fix

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-08 20:25:44 +00:00
Devin AI
e52d48c5cf Use explicit SSLContext for better socket handling on Windows/MSYS2
Replace tuple-based ssl_context with explicit ssl.SSLContext creation using
PROTOCOL_TLS_SERVER and load_cert_chain(). This follows Python ssl module
best practices and may handle socket configuration more robustly on MSYS2
where sockets may default to non-blocking mode.

The tuple shortcut (cert, key) internally creates an SSLContext, but using
an explicit SSLContext gives us better control and follows the documented
approach for server-side SSL. This may help with the errno 11 (Resource
temporarily unavailable) issue on Windows/MSYS2.

If this doesn't resolve the issue, we'll need to investigate more invasive
solutions like wrapping Werkzeug's socket creation.

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-08 20:12:41 +00:00
Devin AI
51183f5df3 Merge branch 'devin/1759948103-replace-cryptography-with-openssl' of https://git-manager.devin.ai/proxy/github.com/Autonomy-Logic/OpenPLC_v3 into devin/1759948103-replace-cryptography-with-openssl 2025-10-08 19:52:48 +00:00
Devin AI
7b16afb69d Fix Windows/MSYS2 compatibility: convert Path to str for ssl_context
Flask/Werkzeug's ssl_context parameter expects string paths, not pathlib.Path
objects. On Windows/MSYS2, passing Path objects causes 'Resource temporarily
unavailable' error. Converting to strings maintains Linux compatibility while
fixing Windows support.

Fixes the error reported by user where context showed PosixPath objects
instead of strings, causing Flask to fail on Windows/MSYS2.

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-08 19:52:35 +00:00
Thiago Alves
1c5fc0323f Removed cryptography dependency and added openssl 2025-10-08 15:08:41 -04:00
Devin AI
1b82973556 Replace Python Cryptography with OpenSSL CLI for certificate generation
- Replace cryptography library with subprocess calls to openssl CLI
- Use RSA 4096-bit keys for stronger security (vs previous 2048-bit)
- Use SHA256 signature algorithm
- Set certificate validity to 36500 days (~100 years, effectively never expires)
- Maintain same CertGen class interface for backward compatibility
- Remove cryptography dependency from requirements.txt

The OpenSSL-based approach is more universally available across platforms
and doesn't require additional Python dependencies. The certificate is
self-signed and can be used for SSH-like validation of embedded PLC devices.

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
2025-10-08 18:29:47 +00:00
Thiago Alves
228f60965d Fix REST API errors and make it conform with v4 API 2025-10-07 14:22:04 -04:00
Thiago Alves
ba55d3bc01 Merge pull request #299 from kristiandueholm/docker-build-bug
Add -lrt flag to main compile.
2025-10-07 09:46:19 -04:00
Kristian Dueholm Hill
2bce18d4e4 Add -lrt flag to main compile. 2025-10-07 13:10:32 +02:00
Thiago Alves
cd369af331 Merge branch 'master' into development 2025-10-06 17:01:11 -04:00
Thiago Alves
611f783b1a Merge pull request #297 from Eyodav/master
Update webserver.py (Fix DoS vulnerability)
2025-10-02 20:06:55 -04:00
Eyodav
004e0ced32 Update webserver.py 2025-09-26 14:06:08 +02:00
Eyodav
095ee09623 Update webserver.py 2025-09-26 11:03:06 +02:00
Thiago Alves
4d8d73f57c Fix python loader cmd stack variable 2025-09-11 13:15:12 -04:00
Thiago Alves
44ae21ae2e Fix compilation issues on Windows 2025-09-10 10:23:45 -04:00
Autonomy Server
4f0f435ea7 Merge branch 'master' into development 2025-09-08 12:09:16 -04:00
Thiago Alves
f52484f9b3 Merge pull request #293 from thiagoralves/dev-python-runtime
Dev python runtime
2025-09-08 12:05:30 -04:00
Autonomy Server
43ad8fb367 Update release version 2025-09-08 12:02:26 -04:00
Autonomy Server
a8b27f4d4a Include Python loader to execute Python-based FBs 2025-09-08 11:49:00 -04:00
Thiago Alves
7c91fd6fa2 Merge pull request #292 from dplastico/fix-enipThread-return
Fixing EnipThread function return
2025-09-03 08:58:15 -04:00
renato
2048a262b4 Fixing EnipThread fucntion return 2025-09-03 00:52:28 -04:00
Michael Scott
6676783016 update synergy blocks 2025-08-27 14:59:51 -04:00
Lucas Cordeiro Butzke
36d067bea1 Merge pull request #3 from Autonomy-Logic/RTOP-26-Login-RestAPI
[RTOP-26] login rest api
2025-07-31 15:11:23 -03:00
Thiago Alves
f06902fde3 Removed password logs for security purposes 2025-07-31 15:05:12 -03:00