Comments (45)
@pio-gra, I've tried to reproduce this and am unable. Do you have any other details to reproduce it maybe?
from ipsk-manager.
I'm having a similar issue with bulk import. I get the CSV built according to the template, but it complains of illegal characters. Then I remove everything but the MAC addresses, and it states that all entries are filtered and "Successful Upload with exceptions on unformatted content". I don't believe I have any illegal characters in any of the fields, but it's hard to know when the output doesn't give any meaningful error handling.
Using iPSK manager on RHEL vm in Azure, uploading via Chrome browser.
from ipsk-manager.
@joe-catanzaro just curious are you using the latest code that was committed a few weeks ago?
Is it possible for you to attach the file you are trying to upload that causes the issue so I can try and reproduce with that same file upload?
Thanks
Nick
from ipsk-manager.
@joe-catanzaro just curious are you using the latest code that was committed a few weeks ago?
Is it possible for you to attach the file you are trying to upload that causes the issue so I can try and reproduce with that same file upload?
Thanks
Nick
hey Nick. this instance was just installed and brought running last week, I did run a git pull and it stated it's up to date.
I had to sanitize the file of the email address field, but that didn't seem to be the one that was causing problems. It seemed to be more the description field. Are there any character count limitations on that field? And I assume underscores are ok in the email field? I.e. [email protected]
from ipsk-manager.
@joe-catanzaro just curious are you using the latest code that was committed a few weeks ago?
Is it possible for you to attach the file you are trying to upload that causes the issue so I can try and reproduce with that same file upload?
Thanks
Nickhey Nick. this instance was just installed and brought running last week, I did run a git pull and it stated it's up to date.
I had to sanitize the file of the email address field, but that didn't seem to be the one that was causing problems. It seemed to be more the description field. Are there any character count limitations on that field? And I assume underscores are ok in the email field? I.e. [email protected]
@ciesinsn realized I forgot to tag, hopefully you saw this.
from ipsk-manager.
@joe-catanzaro The file you attached I'm able to upload just fine, I assume it may be something in your description causing the issue. There is a filter that checks for invalid characters when a file is uploaded. When you upload the file do you see the count for invalid characters be anything other then zero? A code comment states " is a illegal character but I've found that & is also triggering the invalid character count and breaking a upload even though & is in the regular expression list. By chance are you using either of those in your file?
from ipsk-manager.
from ipsk-manager.
@joe-catanzaro so this is when you try to upload the file you attached the other day? I have no issues with that file. Can you include a screenshot of the screen that shows whats been uploaded/filtered (the count). What version of PHP are you using and what OS is this on? Also, can you attach your php.ini file.
from ipsk-manager.
@joe-catanzaro so this is when you try to upload the file you attached the other day? I have no issues with that file. Can you include a screenshot of the screen that shows whats been uploaded/filtered (the count). What version of PHP are you using and what OS is this on? Also, can you attach your php.ini file.
Yes, same file.
This is running on RHEL 9.2, PHP version info below:
PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies
PHP ini attached also
ipskmanager php ini.txt
from ipsk-manager.
@joe-catanzaro, I'm on PHP 8.2 and our php.ini's are almost identical. Looking at your file as-is again (without my testing changes), I get the same issue. But after looking at the code I see why. Your file doesn't have a email listed and email is a required field.
iPSK-Manager/adminportal/ajax/fileupload.php
Lines 115 to 123 in 9ffede9
Once you put a email in it should fix the filter issue (hopefully) and I think my pushed fixed for & will solve the description issue if that was a character you where using.
from ipsk-manager.
from ipsk-manager.
from ipsk-manager.
@joe-catanzaro, it was the underscore causing a issue. It was another character not being handled properly by the illegal character check along with &. I pushed a fix already and it does work for me. Give it a try and see if it fixes it for you as well.
from ipsk-manager.
@ciesinsn so now I've done the git pull, restarted the box etc., and I can't get any file to upload to it now. Using chrome, i've updated the browser and disabled adblockers etc. but nothing happens when i click the upload button.
from ipsk-manager.
@joe-catanzaro when was the last time you did a pull? The only things changed regarding this particular issue was two modifications to one line of code to handle a & and _ being in the CSV text. Is there any sort of error if you open developer tools on the browser?
from ipsk-manager.
@ciesinsn did it again today just to be sure, return was 'already up to date'. In the dev tools I see this:
from ipsk-manager.
from ipsk-manager.
Can you try and back rev that file only? That was the only one changed. Don't understand why you'd have a issue and I wouldn't, especially for the minor change that was done.
…
On Wed, Nov 15, 2023 at 1:33 PM joe-catanzaro @.> wrote: @ciesinsn https://github.com/ciesinsn did it again today just to be sure, return was 'already up to date'. In the dev tools I see this: [image: devtool error] https://user-images.githubusercontent.com/150154731/283227721-63a08bc5-5b93-4b1c-b5ef-572c9d6f234f.PNG — Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI5G4RIBBOCNXGWEZ5LW673YEUKKHAVCNFSM6AAAAAAQCESLA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJTGE2DANRXGQ . You are receiving this because you were mentioned.Message ID: @.>
@ciesinsn sorry, how would I do that?
from ipsk-manager.
Pull file from that link and manually put it in place. @joe-catanzaro
from ipsk-manager.
@ciesinsn ok, back rev'ed that file and noticed it was set for root as owner not apache. Fixed that, restarted HTTPD and still getting the same condition when I click 'upload' (nothing happens) but no more error in the dev tools console.
from ipsk-manager.
from ipsk-manager.
I don't think I had done a pull since initial installation up until the update for this issue. I've used two different versions of that file, the 'problem file' is a copy of the actual one i've been working off of
from ipsk-manager.
pulled a new template file, copied in some mac values and populated other values but same condition. it recognizes the file, lights up the upload button, but clicking 'upload' doesn't do anything and nothing happens in the dev console.
from ipsk-manager.
@joe-catanzaro I can not reproduce any issue like that and I've tried a few files. Did you clear cache/history/etc.. in browser already?
Also, from within developer tools you should see in the network tab when you press upload it should place a new fileupload.php in the list, does it? if it does click it, go to the response tab, what is shown there, anything?
from ipsk-manager.
Yes, I do see a new fileupload.php being generated each time. Output from response page attached.
Uploading response page.txt…
from ipsk-manager.
@joe-catanzaro Looks like the file didn't upload right on your last message
from ipsk-manager.
May not have waited long enough
from ipsk-manager.
@joe-catanzaro Still think something isn't right with that file upload. There is a lot of text/code in it referencing github.
from ipsk-manager.
I created a new CSV, manually typed in everything except I copy/paste values for the MAC addresses, nothing happens when I click upload.
from ipsk-manager.
opened the CSV in notepad, nothing out of the ordinary in the file
from ipsk-manager.
@joe-catanzaro I meant the upload of that response data from the web debugger
from ipsk-manager.
is it maybe something to do with the fileupload.php file?
from ipsk-manager.
@joe-catanzaro This is what I'm looking for from you from the developer tools in a browser which isn't coming through on your attachments in github correctly.
![image](https://private-user-images.githubusercontent.com/37383749/284291027-7797ee2e-d15a-4df7-8400-1a6ab7e2ed7d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0OTk4MTIsIm5iZiI6MTcyMzQ5OTUxMiwicGF0aCI6Ii8zNzM4Mzc0OS8yODQyOTEwMjctNzc5N2VlMmUtZDE1YS00ZGY3LTg0MDAtMWE2YWI3ZTJlZDdkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEyVDIxNTE1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMzMThjODFhMGEwNTcwZmU4N2UwMTUyMTM0NjBkNWEyMTYwODAwZTNkYmMwYzhmZjVhODE4MzU4OTdiYTM1ZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BRxnZoMnQSZQAgwKok9an9kCG2nzl8-GjKcKcwkwg7c)
from ipsk-manager.
Yes, all that text in the file I sent is what comes up in the 'response' tab
from ipsk-manager.
@joe-catanzaro The text in the file you attached when I downloaded it has a lot of text that says "github". That in no way should be in that file.
from ipsk-manager.
@joe-catanzaro The text in the file you attached when I downloaded it has a lot of text that says "github". That in no way should be in that file.
Something for sure went wrong pulling down that fileupload.php file. Going to try replacing it
from ipsk-manager.
ok, fixed the fileupload.php file and now I'm at least getting responses, but back to square one with all of the csv's we've been working with here.
problem file still fails with Successful Upload with exceptions on unformatted content, illegal characters
original file with blank descriptions sees same failure as above
newly created file fails with Invalid CSV Header Attributes, even though they're identical to the template
from ipsk-manager.
@joe-catanzaro Sure you have the latest version of the fileupload.php file? I've tried all your files and don't have any issues with the changes in the latest version. I even hand typed a few lines of your image a few messages above and don't have a issue.
from ipsk-manager.
I've tried with both the previous version as well as the most recent one, doesn't seem to make a difference.
I think the more concerning thing is the file I hand typed out including headers and it's saying 'invalid header attributes'.
from ipsk-manager.
@joe-catanzaro can you past in what line 105 looks like in your current fileupload.php file? Also, is there anything in the developer tools response other then just the one line of json with the counts of each issue?
from ipsk-manager.
Line 105 reads:
$tempEntrydata = filter_var(trim($data),FILTER_VALIDATE_REGEXP, Array('options'=> Array('regexp' => "/^(?:([a-z]|[A-Z]|[0-9]|-|:|,|'|@|\.|;|\/|\(|\\|\&|#|\*|\s){1,})$/")));
Doesn't look like the underscore is in there.
Nothing other than the single line of JSON in the response
from ipsk-manager.
@joe-catanzaro That is not the latest file then. It's also missing the & fix
from ipsk-manager.
aha. that did it.
apparently what appeared to be the most recent file that I was looking at in github was not.
I went in and replaced line 105 with the updated version and now it worked. Thank you so much for your responsiveness and assistance with this!
from ipsk-manager.
@joe-catanzaro no problem on the assistance. So just wanted to make sure, it sounds like all your uploads are working now, is that the case? if so I'll probably close out this mile long issue :)
from ipsk-manager.
from ipsk-manager.
Related Issues (20)
- iPSK-Manager Fails to create DB HOT 4
- Is this still being developed? HOT 5
- LDAPS failed HOT 3
- How to upgrade HOT 11
- Doku is reffering to an Appendix HOT 1
- Cannot get the iPSK Page to run as expected HOT 2
- Add pinpoint for CSV import failures (i.e. illegal character at line X) HOT 6
- Filtering and additional columns on Endpoint List Page HOT 7
- Add ability to search endpoint list by attributes, including MAC address, name and email to the Sponsor Portal HOT 3
- First endpoint created in a new deployment does not show up in the endpoint list. HOT 2
- First Entry in Endpoints not showing HOT 1
- Internal Group Duplicate Name
- Add additional columns to the Sponsor Portal HOT 3
- Modal verification not working properly
- Not able to login with LDAPS HOT 30
- Individual endpoint column filters broken HOT 1
- Port enhancement from commit 458bc66 and issue #30 to the sponsor portal pages HOT 1
- unable to reference accountEnabled attribute HOT 7
- Endpoint expiration email alert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipsk-manager.