Is _mmServerScripts necessary? - sql

When developing sites using Dreamweaver, it creates a _mmServerScripts directory on the root of your site. We've been reading that this folder contains SQL statements that are vulnerable to attack. We would like to avoid this all together, if possible. Is this folder even necessary? Can you do anything to Dreamweaver to tell it to never create these folders?
Thanks in advance.

When you're creating dynamic pages with Dreamweaver, it creates files in the _mmServerScripts folder. Those files are used to obtain information about your database, such as table names, table columns, and column types. This information is used within the built-in server behaviors (and possibly third-party extensions) in order to generate the appropriate code to insert into your page. One such server behavior would be the Recordset server behavior. This interface allows you to select a data source, table name, and column names to include in the recordset.
If you do not use any of the dynamic data functions within Dreamweaver, it probably does not create the _mmServerScripts folder, but if you use that functionality, it will create that folder. If you want to remove the files in this folder, which is hidden within the Dreamweaver Files panel by default (show hidden files: Files panel option menu on the upper right of the panel, View -> Show Hidden Files) by selecting:
Site -> Advanced -> Remove Connection Scripts
I do not have a very extensive knowledge of the contents of the files, so I can't comment knowledgeably about what, if any, vulnerabilities exist within the files within the folder, but it would be good to include links to such discussions you've been reading about.

Related

Programmatically set default column values based on folder in SharePoint Online

I'm working on enhancing metadata in our SharePoint online (O365) environment. Since a portion of my user base is used to foldering (explorer style), I've started using default column values to automatically set values on any files added to that specific folder (we have content organized categorically by folder currently). An example is our HR documents library - we have separate folders for recruiting, payroll, personnel files, etc. that automatically categorize files added to that folder with the same categories (recruiting, payroll, personnel, etc.). This supports both "search" and "click" users and makes adoption WAY easier while getting important metadata.
I want to implement this in a larger, more dynamic fashion, so manually setting default column values on each folder is not going to be scalable.
How can I reference the top level folder within the library (or even the current folder) for each newly added file and populate the "category" field for that new file with that folder name? I can do some very basic C# or Java code copy/paste, but bonus points for non-coding solutions =)
This problem can be solved through no coding.You can use the workflow to implement this by SharePoint Designer.
Create different view for different function team, and then use the view filter to show the document.
If you upload a file, use the workflow to set the metadata of the file. There are some known limitations: if you upload multiple files at the same time, the metadata for the file maybe does not work well; or if you upload a folder, the meta will not work for it and the file in the folder may not be set to right metadata.
I was actually able to use MS Flow to accomplish this in a pretty simple and straightforward fashion without managing custom views per team. The concept at a high level was:
(Trigger) When a new document is created in a folder in the library
Get the link of the parent folder of the newly added document
Create a variable (or just code it out in the Flow step) to parse out the name of the parent folder from the parent folder link (should be all text to the right of the last "/")
Set the category field as the variable
I'm sure that you could do the same right in a SharePoint designer workflow, but I prefer flow due to the visual aspect of it and being far easier to troubleshoot.

Apache Folder Index Description Field

In an Apache Index file listing, there is a description field (along with Name, Last Modified and Size). What should or could populate this column of data?
More information:
On an Apache web server, I can enable a setting called "Apache Module mod_autoindex"
When this setting is enabled, if I visit a folder in a browser, and that folder does not have an index.html file, Apache will display the files and folders in that folder. The interface is pretty basic, but provides useful information about the files on a server.
File/folder information is displayed in a table with 4 columns (presumably generated by Apache). These columns are: Name, Last Modified, Size and Description.
Name, Last Modified and Size are self-explanatory. The description column however, is always empty. I was curious would could or should show up here. I had a hard time finding documentation on it.
A colleague of mine here found what I needed.
The description column on the Apache File Listing index view is populated using data you can create here: http://httpd.apache.org/docs/current/mod/mod_autoindex.html#adddescription
Edit: I'll also add that this documentation on setting file index formatting and descriptions via the .htaccess file is really helpful too: https://perishablepress.com/better-default-directory-views-with-htaccess/
Take a look at my website: https://wrcraig.com/ApacheDirectoryDescriptions. It goes beyond the default directory description, providing a spreadsheet to assist in creating detailed descriptions and exporting them in FancyIndex/AddDescription format for inclusion in .htaccess.
It also provides a menu driven BASH scripted alternative, using the FancyIndex descriptive data above (automatically adding A/V durations) to recursively populate index.html while retaining the security features of .htaccess.
The site has examples of the input spreadsheet and both the FancyIndex output and the optional BASH scripted output.

Xpages : Possible to inherit all Select 2 components

I have got Select2 working. Awesome, awesome component.
We have a db with some common elements which we inherit to databases. I would like to add Select2 to this db, so it will be easily available to databases, but don't know how to do that, as you have to put some items in the package explorer.
Any way to do this?
It is possible if you inherit the whole template:
create a database with all design elements you want to have as default in a database including Select2 parts in WebContent folder
define this database as template "CommonElements" (or another unique template name) in database properties
define the template "CommonElements" as "Inherit design from master template" in every database where those design elements are needed
and make sure that every additional design element has set "Prohibit design refresh"
or inherits from a design template.
In case you have additional elements in WebContent folder set "Prohibit design refresh" flag to those design elements with File > Application > Set Prohibit Refresh Properity... too
All design elements including all WebContent folders are inherited from master template when you execute File > Application > Refresh Design... or when designer process runs on server.
I don't think that is possible. You could set up a central "resources.nsf" with the select2 components and load all the resources you need (manually) from all other databases.
Unless your users do not have internet access (either fire-walled or offline) you may as well just use a CDN. That way all your users will have a cached version of the download library on all of your sites and you don't have to worry about hosting it somehow.
https://cdnjs.com/libraries/select2
for example
It might also be worth looking at the Import and Export from Domino Designer project on OpenNTF. It allows you to create an portlist.xml file, which tells the plugin which files to import. It still requires a manual action to import, but will allow you to overwrite files.
Although using plugins is the place to aim to get to, this is a perfectly valid and good practice method for handling copying all relevant files into an NSF. It's used in XPages OpenLog Logger project on OpenNTF, for the NSF-based option.

VB.NET Create downloadable resource

I've become stuck at this hurdle. I'm trying to create a database that clients fill in, however the client can set different database paths to view different information in the program. I want to create template databases so should they wish to create a new database it will work with the SQL queries the program uses.
I'm trying to save the templates in to the program so that when a button is clicked, the template file is "downloaded" (copied) to the clients desktop.
Is this even possible?
Thanks
You can open the Resources page of the project properties and add any existing file, including a SQL Server MDF data file. At run time, you can get the data of the file from the appropriate property of My.Resources. The type of the data depends on the type of the file. I'd expect that an MDF file would come back as a Byte array, which you can then write to a file or whatever.
That said, you don't want to make your EXE too big by embedding several sizeable data files in it. You might be better off just using loose files in a subfolder or, if you're determined to use resources, create a satellite assembly, i.e. a DLL that contains just resources.

Need VB.NET Resource Files clarification

In a VB project I can add a resource via the project properties resources tab, or I can right-click the project in the solution explorer, click add, then click add existing item.
What are the differences?
If I want to add a DLL file and include it as an embedded resource, do I have to add the file via both methods? Only one?
Thanks.
What you are describing is linked and embedded resources.
Check out this page which describes the differences:
Linked vs. Embedded Resources
From the MSDN link above:
Embedded Resources
Embedded resources are the best choice if you need to share application resource (.resx) files between multiple projects.
For example, if you have a common resource file that contains your company's logos, trademark information, and such, using embedded resources means you only have to copy the .resx file and not the associated resource data files.
You cannot edit embedded resources directly. If you try to edit an embedded resource, you will receive a message prompting you to convert the item to a linked resource in order to edit it; conversion is recommended but optional. You must export them, make your modifications in an external program, and then import them back into your project.
Linked Resources
Linked resources (the default) are the best choice for ease of use.
Resources can be edited directly inside the project, and you can easily add or remove resources as needed.
Edit
You would only need to add your DLL using one method. Which one you select depends on which method best fits your needs (as per the descriptions above)