-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: All zip
types are accepted
#44
Comments
I'd suspect the same with install by URL. I guess you should check for Plugin.php existence. |
I think I did the same “verification” as KB does when installing a plugin. And this surely could be improved. |
It's definitely a minimumal check, but better than no check. |
@alfredbuehler @creecros Can somebody please check this? I don't think the file version is working... because I THINK it looks for |
If I have broken the code due to converting to Kanboard syntax, just let me know so I can revert it to the original PR |
There is little kanboard checks for the
|
OK, I'll have a look. |
It should be fixed by 38db9fc |
I dont understand the merge, will look at it properly from a computer tonight... I noticed you moved the redirects in each error... I did it that way because if the install fails for whatever reason, a user should return to the page it came from - manual plugins.... kanboard by habit, redirects to the installed page regardless of response which is wrong i believe. I will put them back in for the erro messages once I can get my head around the changes. |
But this is much clearer now. On success, it redirects to the installed plugin page. On failure, it remains on the manual plugin page, with an error message on top. It doesn't make sense to leave the page after a failure. |
exactly, agreed. Thats what I had done previously, maybe you did it in a better way.... anyway I will look at it properly tonight |
For URL it is still not working I tried installing this |
@alfredbuehler I also think your speed on the manual page issue is to do with your last commit, as I am also having intermittent speed lags I am noticing now and then for the anual plugins page. Will keep an eye on that |
I also tried with this url |
Why? It was you, who wrote the plugin test. This plugin passes all the tests. It can be opened, contains at least one file, contains a Plugin.php, can be expanded… |
Yes but it doesn't work when I do the same zip through the file option. Which seems to follow the tests. Are you sure the URL option is following the same tests? |
the url, produces a zip, that meets all the criteria. your file does not. surely you can see that. or maybe not, i have no idea what file you are uploading. |
Please see the code. The URL method calls the same method as for file, after downloading the archive. |
Omitting the directory was not a great idea, you should assert that dirname == pluginname. https://github.com/aljawaid/PluginManager/blob/master/Controller/PluginManagerController.php#L94 |
i just tested and both installed, obviously the folder name is incorrect to work, but they both installed it. |
Maybe I did it wrong then. I need help. I kitted the directory because plugin.php is in the subdirectory |
Exactly but only as a success message, because of the wrong folder structure it will never install or show as installed but still give a success message. |
Another solution could be, performing these checks after installing.
|
i get the message for neither |
I honestly don't know what to do I will release it as it is and see if anyone reports anything. Creecros says he got no error messages so that's baffled me more. |
No wait. I'll amend another check. |
This now enforces namespace == directory == plugin name within the zip archive. |
I just tried to manually install a random zip file and it gave a success alert that the plugin is installed successfully. BUt the plugin does not show up anywhere obviously as it was just a random
.zip
of files unrelated to kanboard plugins.I was expecting an error alert to say the zip file is not recognised.
@alfredbuehler Can you please have a look at that part of the code again?
The text was updated successfully, but these errors were encountered: