Search found 18 matches
- Fri Aug 12, 2016 9:23 am
- Forum: Scripting
- Topic: SQL Injection
- Replies: 7
- Views: 3751
Re: SQL Injection
I've got an ODBC connection to the database now, if you're able to get something working that would be great! It's been added to v2 of the script here: https://github.com/open-automation/switch-sql-query Currently, it allows for 3 parameters. Just structure your SQL query with named placeholders pr...
- Thu Aug 11, 2016 9:00 am
- Forum: Scripting
- Topic: SQL Injection
- Replies: 7
- Views: 3751
Re: SQL Injection
Dominick, I'm actually using UPDATE's rather than SELECT's, is this still a viable option? Yep. But you'll need an ODBC connection to your database to use my script, so perhaps make sure that you can swing that before jumping ship on stored procedures. I've got an ODBC connection to the database no...
- Wed Aug 10, 2016 5:06 pm
- Forum: Scripting
- Topic: SQL Injection
- Replies: 7
- Views: 3751
Re: SQL Injection
Freddy, that looks like it might be the safest way to go, I'll have a look to see whether or not it's viable in my (antiquated) database setup.
Dominick, I'm actually using UPDATE's rather than SELECT's, is this still a viable option?
Dominick, I'm actually using UPDATE's rather than SELECT's, is this still a viable option?
- Wed Aug 10, 2016 11:37 am
- Forum: Scripting
- Topic: SQL Injection
- Replies: 7
- Views: 3751
SQL Injection
Hello, I was planning on using the standard database connect flow element but concluded that it probably doesn't have any sort of SQL injection prevention built in...Does Switch JavaScript have any sort of SQL injection prevention or a way to sanitize database inputs? I've gone through the manual on...
- Tue Jul 26, 2016 9:02 am
- Forum: Scripting
- Topic: Regex Ignoring New Lines
- Replies: 4
- Views: 2407
Re: Regex Ignoring New Lines
What system produces files like that? Seems like having Switch parse through a file like this reliably would be very challenging and prone to error. Tell me about it. :lol: I've no idea what the system is, I believe it's something bespoke our client had built for them by a third party, but I've bee...
- Mon Jul 25, 2016 2:38 pm
- Forum: Scripting
- Topic: Regex Ignoring New Lines
- Replies: 4
- Views: 2407
Regex Ignoring New Lines
Hi guys, I have a windows formatted text file (\r\n) that I am reading into a switch script. Here is an example of the format: =======Section A======= Value 1: I need this value Value 2: I need this value Value 3: I need this value =======Section B======= Value 4: I need all of these values Value 5:...
- Wed Jul 20, 2016 4:39 pm
- Forum: Flows
- Topic: Switch Not Processing
- Replies: 7
- Views: 4090
Re: Switch Not Processing
I wish I knew what caused it. I thought that it was particularly high yield of files but sometimes that isn't the case.
Interestingly Pitstop Server also seems to stop processing files when it happens.
Interestingly Pitstop Server also seems to stop processing files when it happens.
- Wed Jul 20, 2016 4:11 pm
- Forum: Flows
- Topic: Switch Not Processing
- Replies: 7
- Views: 4090
Re: Switch Not Processing
Do you have anything particularly clever setup in regards to stop processing, start processing etc. or are you just doing a standard system reboot? I don't know whether it's correct or not but it was instilled in me while learning Switch that you should always stop processing before restarting the s...
- Wed Jul 20, 2016 10:30 am
- Forum: Flows
- Topic: Switch Not Processing
- Replies: 7
- Views: 4090
Switch Not Processing
I've got a bit of weird one. It used to happen maybe once a year but over the past few weeks it seems to becoming a daily experience. For some reason Switch will just stop doing...anything! I don't get any error messages, but if I look at a flow there will be files in it not moving. The only way to ...
- Thu Jun 30, 2016 9:56 am
- Forum: Flows
- Topic: Injecting Switch Backing Files
- Replies: 4
- Views: 3032
Re: Injecting Switch Backing Files
Very interesting! You know, I was just in the throes of writing my own timer based file injector, but the fact you've written one and have been gracious enough to let us use it will save me a lot of time! Can I ask, did you manage to get around timeFired always firing on flow activation regardless o...
- Thu Jun 09, 2016 11:28 am
- Forum: Scripting
- Topic: Receiving Multiple Files From Execute Command
- Replies: 5
- Views: 2721
Re: Receiving Multiple Files From Execute Command
Oh yeah, I misunderstood your question. My comments were assuming you were writing a script to process.execute and put new files in your flow. I really know nothing about the execute command configurator :/ Me neither apparently! Normally I would have done what you suggested and encapsulated the py...
- Thu Jun 09, 2016 9:57 am
- Forum: Scripting
- Topic: Receiving Multiple Files From Execute Command
- Replies: 5
- Views: 2721
Re: Receiving Multiple Files From Execute Command
Hey man, I'm not familiar with "Folder at Path" but I can tell you some of the ways I would consider doing it. Within the script, you have to use a sendTo function to route the job out of the script. You want to send the files out as Jobs. Ideally, you want to use the same job, so it keep...
- Wed Jun 08, 2016 9:52 am
- Forum: Scripting
- Topic: Receiving Multiple Files From Execute Command
- Replies: 5
- Views: 2721
Receiving Multiple Files From Execute Command
Hi guys, I was wondering if anyone can give me any insight into working with the Execute Command configurator? I've written a Python script which is receiving a CSV list of files, logging into a website and looking for the files in the list. I then want it to output all of the files back into the fl...
- Thu Feb 18, 2016 10:07 am
- Forum: Scripting
- Topic: Variable email user name
- Replies: 1
- Views: 2605
Variable email user name
Hello all, I've had a look around in the old threads but haven't seen anything posted recently to do with this. We'd like to have Switch send out emails on behalf of our customer services staff, but I can't find any way of setting this dynamically. The reply address property on Mail send does help t...
- Fri Aug 07, 2015 12:53 pm
- Forum: Scripting
- Topic: Creating new job via script
- Replies: 7
- Views: 5044
Re: Creating new job via script
And there you have it, it's now outputting. In the original script, I had the line: var newFile = new File(s.createPathWithName("#" + orderID + "-#" + lineID + "(" + lineNum + ").dg")); I had assumed that this was sufficient enough to create the file, but appa...